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()
/// 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>);
@ -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>,

View file

@ -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");

View file

@ -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) {

View file

@ -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

View file

@ -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));
}

View file

@ -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>>);

View file

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