Skip to content

Commit

Permalink
Update to Rust 1.80
Browse files Browse the repository at this point in the history
  • Loading branch information
dae committed Aug 5, 2024
1 parent b1bf1c3 commit ca43931
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 23 deletions.
18 changes: 9 additions & 9 deletions build/ninja_gen/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,8 @@ pub trait FilesHandle {
/// different variables. This is a shortcut for calling .expand_inputs()
/// and then .add_inputs_vec()
/// - If the variable name is non-empty, a variable of the same name will be
/// created so the file list can be accessed in the command. By convention,
/// this is often `in`.
/// created so the file list can be accessed in the command. By
/// convention, this is often `in`.
fn add_inputs(&mut self, variable: &'static str, inputs: impl AsRef<BuildInput>);
fn add_inputs_vec(&mut self, variable: &'static str, inputs: Vec<String>);
fn add_order_only_inputs(&mut self, variable: &'static str, inputs: impl AsRef<BuildInput>);
Expand All @@ -392,14 +392,14 @@ pub trait FilesHandle {
/// Add outputs to the build statement. Can be called multiple times with
/// different variables.
/// - Each output automatically has $builddir/ prefixed to it if it does not
/// already start with it.
/// already start with it.
/// - If the variable name is non-empty, a variable of the same name will be
/// created so the file list can be accessed in the command. By convention,
/// this is often `out`.
/// - If subgroup is true, the files are also placed in a subgroup. Eg
/// if a rule `foo` exists and subgroup `bar` is provided, the files are
/// accessible via `:foo:bar`. The variable name must not be empty, or
/// called `out`.
/// created so the file list can be accessed in the command. By
/// convention, this is often `out`.
/// - If subgroup is true, the files are also placed in a subgroup. Eg if a
/// rule `foo` exists and subgroup `bar` is provided, the files are
/// accessible via `:foo:bar`. The variable name must not be empty, or
/// called `out`.
fn add_outputs_ext(
&mut self,
variable: impl Into<String>,
Expand Down
2 changes: 1 addition & 1 deletion build/ninja_gen/src/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ impl BuildAction for PythonTest {
build.add_variable("folder", self.folder);
build.add_variable(
"pythonpath",
&self.python_path.join(if cfg!(windows) { ";" } else { ":" }),
self.python_path.join(if cfg!(windows) { ";" } else { ":" }),
);
build.add_env_var("PYTHONPATH", "$pythonpath");
build.add_env_var("ANKI_TEST_MODE", "1");
Expand Down
1 change: 1 addition & 0 deletions rslib/proto/python.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ fn format_comments(comments: &Option<String>) -> String {
/// - it has a single field
/// - its name ends in Request
/// - it has any optional fields
///
/// ...then destructuring will be skipped, and the method will take the input
/// message directly. Returns (params_line, assignment_lines)
fn maybe_destructured_input(input: &MessageDescriptor) -> (String, String) {
Expand Down
8 changes: 4 additions & 4 deletions rslib/proto_gen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ use walkdir::WalkDir;
/// expected to exist (but may be empty).
///
/// - If a method is listed in BackendExampleService and not in ExampleService,
/// that method is only available with a Backend.
/// that method is only available with a Backend.
/// - If a method is listed in both services, you can provide separate
/// implementations for each of the traits.
/// implementations for each of the traits.
/// - If a method is listed only in ExampleService, a forwarding method on
/// Backend is automatically implemented. This bypasses the trait and implements
/// directly on Backend.
/// Backend is automatically implemented. This bypasses the trait and
/// implements directly on Backend.
///
/// It's important that service and method indices are the same for
/// client-generated code, so the client code should use the .index fields
Expand Down
5 changes: 1 addition & 4 deletions rslib/src/import_export/package/apkg/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,7 @@ impl Collection {
(SAMPLE_JS, JS_DATA),
] {
// data should have been copied correctly
assert_eq!(
read_file(&self.media_folder.join(fname)).unwrap(),
orig_data
);
assert_eq!(read_file(self.media_folder.join(fname)).unwrap(), orig_data);
// and checksums in media db should be valid
assert_eq!(*csums.get(fname).unwrap(), sha1_of_data(orig_data));
}
Expand Down
7 changes: 3 additions & 4 deletions rslib/src/sync/http_client/io_monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ use crate::sync::request::header_and_stream::encode_zstd_body_stream;
use crate::sync::response::ORIGINAL_SIZE;

/// Serves two purposes:
/// - allows us to monitor data sending/receiving and abort if
/// the transfer stalls
/// - allows us to monitor amount of data moving, to provide progress
/// reporting
/// - allows us to monitor data sending/receiving and abort if the transfer
/// stalls
/// - allows us to monitor amount of data moving, to provide progress reporting
#[derive(Clone)]
pub struct IoMonitor(pub Arc<Mutex<IoMonitorInner>>);

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
# older versions may fail to compile; newer versions may fail the clippy tests
channel = "1.79"
channel = "1.80"

0 comments on commit ca43931

Please sign in to comment.