Skip to content

Commit

Permalink
Fix clippy and doc tests
Browse files Browse the repository at this point in the history
```
error: the borrowed expression implements the required traits
   --> ruby_executable/src/bin/ruby_build.rs:143:24
    |
143 |           docker_run.arg(&format!(
    |  ________________________^
144 | |             "./make_ruby.sh {} {}",
145 | |             input_tar.display(),
146 | |             output_tar.display()
147 | |         ));
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
    = note: `-D clippy::needless-borrows-for-generic-args` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::needless_borrows_for_generic_args)]`
help: change this to
    |
143 ~         docker_run.arg(format!(
144 +             "./make_ruby.sh {} {}",
145 +             input_tar.display(),
146 +             output_tar.display()
147 ~         ));
    |

error: could not compile `ruby_executable` (bin "ruby_build" test) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
```
  • Loading branch information
schneems committed Sep 5, 2024
1 parent b8cfa55 commit a83e17d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions jruby_executable/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
/// implements Ruby 3.1.4 stdlib. When people use jruby they specify both the
/// jruby version and the stdlib version, for example:
///
/// ```ignore
/// ```
/// # Gemfile
/// ruby "3.1.4", engine: "jruby", engine_version: "9.4.3.0"
/// ```
///
/// Example file for <https://raw.githubusercontent.com/jruby/jruby/9.4.7.0/default.build.properties>
///
/// ```ignore
/// ```
/// # Defaults. To override, create a file called build.properties in
/// # the same directory and put your changes in that.
/// #src.dir=src
Expand Down
2 changes: 1 addition & 1 deletion ruby_executable/src/bin/ruby_build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ fn ruby_build(args: &RubyArgs) -> Result<(), Box<dyn std::error::Error>> {

docker_run.arg(&image_name);
docker_run.args(["bash", "-c"]);
docker_run.arg(&format!(
docker_run.arg(format!(
"./make_ruby.sh {} {}",
input_tar.display(),
output_tar.display()
Expand Down

0 comments on commit a83e17d

Please sign in to comment.