Raise MSRV to 1.62
This commit is contained in:
parent
1291929131
commit
66ff4dbaad
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@ -73,7 +73,7 @@ jobs:
|
||||
run: target/debug/xtask ci lint
|
||||
|
||||
msrv:
|
||||
name: Rust 1.60 / ${{ matrix.name }}
|
||||
name: Rust 1.62 / ${{ matrix.name }}
|
||||
needs: xtask
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
@ -98,11 +98,11 @@ jobs:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install rust 1.60 toolchain
|
||||
- name: Install rust 1.62 toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: "1.60"
|
||||
toolchain: "1.62"
|
||||
|
||||
# Used to compile xtask
|
||||
- name: Install rust stable toolchain
|
||||
@ -117,7 +117,7 @@ jobs:
|
||||
# A stable compiler update should automatically not reuse old caches.
|
||||
# Add the MSRV as a stable cache key too so bumping it also gets us a
|
||||
# fresh cache.
|
||||
sharedKey: msrv1.60
|
||||
sharedKey: msrv1.62
|
||||
|
||||
- name: Get xtask
|
||||
uses: actions/cache@v3
|
||||
@ -249,7 +249,7 @@ jobs:
|
||||
|
||||
- name: Build docs
|
||||
run: target/debug/xtask doc --deny-warnings
|
||||
|
||||
|
||||
- name: Compress docs
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
|
@ -52,7 +52,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md).
|
||||
|
||||
## Minimum Rust version
|
||||
|
||||
Ruma currently requires Rust 1.60. In general, we will never require beta or
|
||||
Ruma currently requires Rust 1.62. In general, we will never require beta or
|
||||
nightly for crates.io releases of our crates, and we will try to avoid releasing
|
||||
crates that depend on features that were only just stabilized.
|
||||
|
||||
|
@ -9,7 +9,7 @@ readme = "README.md"
|
||||
repository = "https://github.com/ruma/ruma"
|
||||
version = "0.7.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.60"
|
||||
rust-version = "1.62"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
@ -9,7 +9,7 @@ readme = "README.md"
|
||||
repository = "https://github.com/ruma/ruma"
|
||||
version = "0.15.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.60"
|
||||
rust-version = "1.62"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
@ -9,7 +9,7 @@ readme = "README.md"
|
||||
repository = "https://github.com/ruma/ruma"
|
||||
version = "0.10.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.60"
|
||||
rust-version = "1.62"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
@ -8,7 +8,7 @@ license = "MIT"
|
||||
readme = "README.md"
|
||||
repository = "https://github.com/ruma/ruma"
|
||||
edition = "2021"
|
||||
rust-version = "1.60"
|
||||
rust-version = "1.62"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
@ -149,7 +149,7 @@ impl RoomMessageEventContent {
|
||||
|
||||
(*body, *formatted_body) = reply::plain_and_formatted_reply_body(
|
||||
body.as_str(),
|
||||
(!formatted_body.is_empty()).then(|| formatted_body.as_str()),
|
||||
(!formatted_body.is_empty()).then_some(formatted_body.as_str()),
|
||||
original_message,
|
||||
);
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ fn get_message_quote_fallbacks(original_message: &OriginalRoomMessageEvent) -> (
|
||||
let get_quotes = |body: &str, formatted: Option<&FormattedBody>, is_emote: bool| {
|
||||
let OriginalRoomMessageEvent { room_id, event_id, sender, content, .. } = original_message;
|
||||
let is_reply = matches!(content.relates_to, Some(Relation::Reply { .. }));
|
||||
let emote_sign = is_emote.then(|| "* ").unwrap_or_default();
|
||||
let emote_sign = is_emote.then_some("* ").unwrap_or_default();
|
||||
let body = is_reply.then(|| remove_plain_reply_fallback(body)).unwrap_or(body);
|
||||
#[cfg(feature = "unstable-sanitize")]
|
||||
let html_body = formatted_or_plain_body(formatted, body, is_reply);
|
||||
|
@ -9,7 +9,7 @@ readme = "README.md"
|
||||
repository = "https://github.com/ruma/ruma"
|
||||
version = "0.6.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.60"
|
||||
rust-version = "1.62"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
@ -6,7 +6,7 @@ repository = "https://github.com/ruma/ruma"
|
||||
license = "MIT"
|
||||
version = "0.9.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.60"
|
||||
rust-version = "1.62"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
@ -8,7 +8,7 @@ license = "MIT"
|
||||
readme = "README.md"
|
||||
repository = "https://github.com/ruma/ruma"
|
||||
edition = "2021"
|
||||
rust-version = "1.60"
|
||||
rust-version = "1.62"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
@ -9,7 +9,7 @@ readme = "README.md"
|
||||
repository = "https://github.com/ruma/ruma"
|
||||
version = "0.10.3"
|
||||
edition = "2021"
|
||||
rust-version = "1.60"
|
||||
rust-version = "1.62"
|
||||
|
||||
[lib]
|
||||
proc-macro = true
|
||||
|
@ -8,7 +8,7 @@ license = "MIT"
|
||||
readme = "README.md"
|
||||
repository = "https://github.com/ruma/ruma"
|
||||
edition = "2021"
|
||||
rust-version = "1.60"
|
||||
rust-version = "1.62"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
@ -9,7 +9,7 @@ readme = "README.md"
|
||||
repository = "https://github.com/ruma/ruma"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.60"
|
||||
rust-version = "1.62"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
@ -9,7 +9,7 @@ readme = "README.md"
|
||||
license = "MIT"
|
||||
version = "0.8.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.60"
|
||||
rust-version = "1.62"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
@ -473,10 +473,10 @@ fn valid_membership_change(
|
||||
let sender_power = power_levels
|
||||
.users
|
||||
.get(sender)
|
||||
.or_else(|| sender_is_joined.then(|| &power_levels.users_default));
|
||||
.or_else(|| sender_is_joined.then_some(&power_levels.users_default));
|
||||
|
||||
let target_power = power_levels.users.get(target_user).or_else(|| {
|
||||
(target_membership == MembershipState::Join).then(|| &power_levels.users_default)
|
||||
(target_membership == MembershipState::Join).then_some(&power_levels.users_default)
|
||||
});
|
||||
|
||||
let mut join_rules = JoinRule::Invite;
|
||||
|
@ -201,7 +201,7 @@ where
|
||||
*id_counts.entry(id).or_default() += 1;
|
||||
}
|
||||
|
||||
id_counts.into_iter().filter_map(move |(id, count)| (count < num_sets).then(move || id))
|
||||
id_counts.into_iter().filter_map(move |(id, count)| (count < num_sets).then_some(id))
|
||||
}
|
||||
|
||||
/// Events are sorted from "earliest" to "latest".
|
||||
@ -437,7 +437,7 @@ fn iterative_auth_check<E: Event + Clone>(
|
||||
// The key for this is (eventType + a state_key of the signed token not sender) so
|
||||
// search for it
|
||||
let current_third_party = auth_events.iter().find_map(|(_, pdu)| {
|
||||
(*pdu.event_type() == RoomEventType::RoomThirdPartyInvite).then(|| pdu)
|
||||
(*pdu.event_type() == RoomEventType::RoomThirdPartyInvite).then_some(pdu)
|
||||
});
|
||||
|
||||
if auth_check(room_version, &event, current_third_party, |ty, key| {
|
||||
|
@ -9,7 +9,7 @@ readme = "README.md"
|
||||
license = "MIT"
|
||||
version = "0.7.3"
|
||||
edition = "2021"
|
||||
rust-version = "1.60"
|
||||
rust-version = "1.62"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
@ -9,7 +9,7 @@ mod spec_links;
|
||||
|
||||
use spec_links::check_spec_links;
|
||||
|
||||
const MSRV: &str = "1.60";
|
||||
const MSRV: &str = "1.62";
|
||||
const NIGHTLY: &str = "nightly";
|
||||
|
||||
#[derive(Args)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user