Damien Elmes 2024-08-05 15:37:36 +07:00
parent b1bf1c3141
commit ca4393142e
7 changed files with 20 additions and 23 deletions

View file

@ -368,8 +368,8 @@ pub trait FilesHandle {
/// different variables. This is a shortcut for calling .expand_inputs() /// different variables. This is a shortcut for calling .expand_inputs()
/// and then .add_inputs_vec() /// and then .add_inputs_vec()
/// - If the variable name is non-empty, a variable of the same name will be /// - 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, /// created so the file list can be accessed in the command. By
/// this is often `in`. /// convention, this is often `in`.
fn add_inputs(&mut self, variable: &'static str, inputs: impl AsRef<BuildInput>); 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_inputs_vec(&mut self, variable: &'static str, inputs: Vec<String>);
fn add_order_only_inputs(&mut self, variable: &'static str, inputs: impl AsRef<BuildInput>); fn add_order_only_inputs(&mut self, variable: &'static str, inputs: impl AsRef<BuildInput>);
@ -394,10 +394,10 @@ pub trait FilesHandle {
/// - Each output automatically has $builddir/ prefixed to it if it does not /// - 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 /// - 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, /// created so the file list can be accessed in the command. By
/// this is often `out`. /// convention, this is often `out`.
/// - If subgroup is true, the files are also placed in a subgroup. Eg /// - If subgroup is true, the files are also placed in a subgroup. Eg if a
/// if a rule `foo` exists and subgroup `bar` is provided, the files are /// rule `foo` exists and subgroup `bar` is provided, the files are
/// accessible via `:foo:bar`. The variable name must not be empty, or /// accessible via `:foo:bar`. The variable name must not be empty, or
/// called `out`. /// called `out`.
fn add_outputs_ext( fn add_outputs_ext(

View file

@ -251,7 +251,7 @@ impl BuildAction for PythonTest {
build.add_variable("folder", self.folder); build.add_variable("folder", self.folder);
build.add_variable( build.add_variable(
"pythonpath", "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("PYTHONPATH", "$pythonpath");
build.add_env_var("ANKI_TEST_MODE", "1"); build.add_env_var("ANKI_TEST_MODE", "1");

View file

@ -97,6 +97,7 @@ fn format_comments(comments: &Option<String>) -> String {
/// - it has a single field /// - it has a single field
/// - its name ends in Request /// - its name ends in Request
/// - it has any optional fields /// - it has any optional fields
///
/// ...then destructuring will be skipped, and the method will take the input /// ...then destructuring will be skipped, and the method will take the input
/// message directly. Returns (params_line, assignment_lines) /// message directly. Returns (params_line, assignment_lines)
fn maybe_destructured_input(input: &MessageDescriptor) -> (String, String) { fn maybe_destructured_input(input: &MessageDescriptor) -> (String, String) {

View file

@ -33,8 +33,8 @@ use walkdir::WalkDir;
/// - If a method is listed in both services, you can provide separate /// - 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 /// - If a method is listed only in ExampleService, a forwarding method on
/// Backend is automatically implemented. This bypasses the trait and implements /// Backend is automatically implemented. This bypasses the trait and
/// directly on Backend. /// implements directly on Backend.
/// ///
/// It's important that service and method indices are the same for /// It's important that service and method indices are the same for
/// client-generated code, so the client code should use the .index fields /// client-generated code, so the client code should use the .index fields

View file

@ -160,10 +160,7 @@ impl Collection {
(SAMPLE_JS, JS_DATA), (SAMPLE_JS, JS_DATA),
] { ] {
// data should have been copied correctly // data should have been copied correctly
assert_eq!( assert_eq!(read_file(self.media_folder.join(fname)).unwrap(), orig_data);
read_file(&self.media_folder.join(fname)).unwrap(),
orig_data
);
// and checksums in media db should be valid // and checksums in media db should be valid
assert_eq!(*csums.get(fname).unwrap(), sha1_of_data(orig_data)); assert_eq!(*csums.get(fname).unwrap(), sha1_of_data(orig_data));
} }

View file

@ -33,10 +33,9 @@ use crate::sync::request::header_and_stream::encode_zstd_body_stream;
use crate::sync::response::ORIGINAL_SIZE; use crate::sync::response::ORIGINAL_SIZE;
/// Serves two purposes: /// Serves two purposes:
/// - allows us to monitor data sending/receiving and abort if /// - allows us to monitor data sending/receiving and abort if the transfer
/// the transfer stalls /// stalls
/// - allows us to monitor amount of data moving, to provide progress /// - allows us to monitor amount of data moving, to provide progress reporting
/// reporting
#[derive(Clone)] #[derive(Clone)]
pub struct IoMonitor(pub Arc<Mutex<IoMonitorInner>>); pub struct IoMonitor(pub Arc<Mutex<IoMonitorInner>>);

View file

@ -1,3 +1,3 @@
[toolchain] [toolchain]
# older versions may fail to compile; newer versions may fail the clippy tests # older versions may fail to compile; newer versions may fail the clippy tests
channel = "1.79" channel = "1.80"