Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update toolchain #62

Merged
merged 1 commit into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
override: true
profile: minimal
toolchain: nightly-2023-10-15
toolchain: nightly-2024-04-27
- uses: actions-rs/[email protected]
with:
crate: cargo-fuzz
Expand All @@ -31,7 +31,7 @@ jobs:
components: clippy, rustfmt
override: true
profile: minimal
toolchain: nightly-2023-10-15
toolchain: nightly-2024-04-27
- uses: Swatinem/rust-cache@v2

- run: .scripts/all.sh
2 changes: 1 addition & 1 deletion ndstruct/src/coo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,6 @@ where
let dims = crate::utils::valid_random_dims(rng, upper_bound);
let max_nnz = crate::utils::max_nnz(&dims);
let nnz = if max_nnz == 0 { 0 } else { rng.gen_range(0..max_nnz) };
Self::new_controlled_random_rand(dims, nnz, rng, |r, _| r.gen())
Self::new_controlled_random_rand(dims, nnz, rng, |r, _| r.r#gen())
}
}
2 changes: 1 addition & 1 deletion ndstruct/src/csl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,6 @@ where
let dims = crate::utils::valid_random_dims(rng, upper_bound);
let max_nnz = max_nnz(&dims);
let nnz = if max_nnz == 0 { 0 } else { rng.gen_range(0..max_nnz) };
Self::new_controlled_random_rand(dims, nnz, rng, |r, _| r.gen())
Self::new_controlled_random_rand(dims, nnz, rng, |r, _| r.r#gen())
}
}
2 changes: 1 addition & 1 deletion ndstruct/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,5 @@ where

#[inline]
pub(crate) fn windows2<T>(slice: &[T]) -> impl Iterator<Item = [&T; 2]> {
slice.windows(2).filter_map(|value| Some([value.get(0)?, value.get(1)?]))
slice.windows(2).filter_map(|value| Some([value.first()?, value.get(1)?]))
}
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "nightly-2023-10-15"
channel = "nightly-2024-04-27"
components = ["clippy", "miri", "rustfmt"]
profile = "minimal"
2 changes: 1 addition & 1 deletion rust-tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ rust-tools --file SOME_CONFIGURATION_FILE.cfg SOME_COMMAND
add_clipy_flags -Aclippy::type_complexity
rm_clippy_flags -Aclippy::implicit_return,-Aclippy::missing_docs_in_private_items
template you-rust
toolchain nightly-2023-10-15
toolchain nightly-2024-04-27
```

## CLI parameters
Expand Down
7 changes: 6 additions & 1 deletion rust-tools/src/cfg/you_rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const CLIPPY_FLAGS: &[&str] = &[
"-Aclippy::absolute_paths",
"-Aclippy::big_endian_bytes",
"-Aclippy::blanket-clippy-restriction-lints",
"-Aclippy::decimal_literal_representation",
"-Aclippy::default_numeric_fallback",
"-Aclippy::doc_markdown",
"-Aclippy::error_impl_error",
Expand All @@ -17,11 +18,14 @@ const CLIPPY_FLAGS: &[&str] = &[
"-Aclippy::ignored_unit_patterns",
"-Aclippy::impl_trait_in_params",
"-Aclippy::implicit_return",
"-Aclippy::inline_always",
"-Aclippy::integer_division_remainder_used",
"-Aclippy::integer_division",
"-Aclippy::into_iter_without_iter",
"-Aclippy::len_without_is_empty",
"-Aclippy::let_underscore_untyped",
"-Aclippy::little_endian_bytes",
"-Aclippy::manual_assert",
"-Aclippy::many_single_char_names",
"-Aclippy::min_ident_chars",
"-Aclippy::missing_assert_message",
Expand All @@ -32,6 +36,7 @@ const CLIPPY_FLAGS: &[&str] = &[
"-Aclippy::multiple_inherent_impl",
"-Aclippy::multiple_unsafe_ops_per_block",
"-Aclippy::must_use_candidate",
"-Aclippy::needless_doctest_main",
"-Aclippy::needless_else",
"-Aclippy::non_ascii_literal",
"-Aclippy::partial_pub_fields",
Expand All @@ -46,6 +51,7 @@ const CLIPPY_FLAGS: &[&str] = &[
"-Aclippy::std_instead_of_core",
"-Aclippy::str_to_string",
"-Aclippy::struct_excessive_bools",
"-Aclippy::struct_field_names",
"-Aclippy::unneeded_field_pattern",
"-Aclippy::unseparated_literal_suffix",
"-Aclippy::unused_self",
Expand Down Expand Up @@ -84,7 +90,6 @@ const RUST_FLAGS: &[&str] = &[
"-Dunused_macro_rules",
"-Dunused_qualifications",
"-Dunused_results",
"-Dunused_tuple_struct_fields",
"-Dwarnings",
];

Expand Down
2 changes: 1 addition & 1 deletion rust-tools/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ fn handle_cmd_output(cmd: &mut Command) -> Result<()> {
write_stdio!(child_stdout, stdout());
}
if !child.wait()?.success() {
return Err(crate::Error::FailedCommand);
return Err(Error::FailedCommand);
}
Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion rust-tools/src/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ impl Params {
manage_flags(&mut self.rust_flags, &tp.add_rust_flags, &tp.rm_rust_flags);
manage_flags(&mut self.rustfmt_flags, &tp.add_rustfmt_flags, &tp.rm_rustfmt_flags);
if !tp.toolchain.is_empty() {
self.toolchain = tp.toolchain.clone();
self.toolchain.clone_from(&tp.toolchain);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions rust-tools/src/parse_cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ mod tests {
rm_rust_flags E
add_rustfmt_flags F
template you-rust
toolchain nightly-2023-10-15
toolchain nightly-2024-04-27
"#;
let (params, tp) = parse_cfg(&cfg[..]).unwrap();
assert_eq!(params, YouRust::default().0);
Expand All @@ -111,6 +111,6 @@ mod tests {
assert_eq!(tp.rm_rust_flags, vec!["E"]);
assert_eq!(tp.add_rustfmt_flags, vec!["F"]);
assert_eq!(tp.rm_rustfmt_flags, Vec::<String>::new());
assert_eq!(tp.toolchain, "nightly-2023-10-15");
assert_eq!(tp.toolchain, "nightly-2024-04-27");
}
}
Loading