Skip to content
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 src/uu/cp/src/copydir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl<'a> Context<'a> {
///
/// For convenience while traversing a directory, the [`Entry::new`]
/// function allows creating an entry from a [`Context`] and a
/// [`walkdir::DirEntry`].
/// [`DirEntry`].
///
/// # Examples
///
Expand Down Expand Up @@ -549,7 +549,7 @@ pub(crate) fn copy_directory(
/// Decide whether the second path is a prefix of the first.
///
/// This function canonicalizes the paths via
/// [`uucore::fs::canonicalize`] before comparing.
/// [`fs::canonicalize`] before comparing.
///
/// # Errors
///
Expand Down
4 changes: 2 additions & 2 deletions src/uu/dd/src/dd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ impl Source {
/// Create a source from stdin using its raw file descriptor.
///
/// This returns an instance of the `Source::StdinFile` variant,
/// using the raw file descriptor of [`std::io::Stdin`] to create
/// the [`std::fs::File`] parameter. You can use this instead of
/// using the raw file descriptor of [`io::Stdin`] to create
/// the [`File`] parameter. You can use this instead of
/// `Source::Stdin` to allow reading from stdin without consuming
/// the entire contents of stdin when this process terminates.
#[cfg(unix)]
Expand Down
4 changes: 2 additions & 2 deletions src/uu/numfmt/src/numfmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,9 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
}

pub fn uu_app() -> Command {
Command::new(uucore::util_name())
Command::new(util_name())
.version(uucore::crate_version!())
.help_template(uucore::localized_help_template(uucore::util_name()))
.help_template(uucore::localized_help_template(util_name()))
.about(translate!("numfmt-about"))
.after_help(translate!("numfmt-after-help"))
.override_usage(format_usage(&translate!("numfmt-usage")))
Expand Down
6 changes: 3 additions & 3 deletions src/uucore/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use std::env;
use std::fs::File;
use std::io::Write;
use std::path::Path;
use std::path::{Path, PathBuf};

pub fn main() -> Result<(), Box<dyn std::error::Error>> {
let out_dir = env::var("OUT_DIR")?;
Expand Down Expand Up @@ -63,7 +63,7 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
///
/// Returns an error if the `CARGO_MANIFEST_DIR` environment variable is not set
/// or if the current directory structure does not allow determining the project root.
fn project_root() -> Result<std::path::PathBuf, Box<dyn std::error::Error>> {
fn project_root() -> Result<PathBuf, Box<dyn std::error::Error>> {
let manifest_dir = env::var("CARGO_MANIFEST_DIR")?;
let uucore_path = Path::new(&manifest_dir);

Expand Down Expand Up @@ -354,7 +354,7 @@ fn embed_component_locales<F>(
path_builder: F,
) -> Result<(), Box<dyn std::error::Error>>
where
F: Fn(&str) -> std::path::PathBuf,
F: Fn(&str) -> PathBuf,
{
for_each_locale(locales, |locale| {
let locale_path = path_builder(locale);
Expand Down
4 changes: 2 additions & 2 deletions src/uucore/src/lib/features/backup_control.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ pub mod arguments {
/// 2. From the "SIMPLE_BACKUP_SUFFIX" environment variable, if present
/// 3. By using the default '~' if none of the others apply
///
/// This function directly takes [`clap::ArgMatches`] as argument and looks for
/// This function directly takes [`ArgMatches`] as argument and looks for
/// the '-S' and '--suffix' arguments itself.
pub fn determine_backup_suffix(matches: &ArgMatches) -> String {
let supplied_suffix = matches.get_one::<String>(arguments::OPT_SUFFIX);
Expand All @@ -261,7 +261,7 @@ pub fn determine_backup_suffix(matches: &ArgMatches) -> String {
/// Parses the backup options according to the [GNU manual][1], and converts
/// them to an instance of `BackupMode` for further processing.
///
/// Takes [`clap::ArgMatches`] as argument which **must** contain the options
/// Takes [`ArgMatches`] as argument which **must** contain the options
/// from [`arguments::backup()`] and [`arguments::backup_no_args()`]. Otherwise
/// the `NoBackup` mode is returned unconditionally.
///
Expand Down
2 changes: 1 addition & 1 deletion src/uucore/src/lib/features/benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ pub mod text_data {
pub fn generate_ascii_data_simple(num_lines: usize) -> Vec<u8> {
let mut data = Vec::new();
for i in 0..num_lines {
let line = format!("line_{:06}\n", (num_lines - i - 1));
let line = format!("line_{:06}\n", num_lines - i - 1);
data.extend_from_slice(line.as_bytes());
}
data
Expand Down
10 changes: 6 additions & 4 deletions tests/by-util/test_tee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,9 @@ mod linux_only {
use std::os::unix::io::FromRawFd;

let mut fds: [c_int; 2] = [0, 0];
assert!(
(unsafe { libc::pipe(std::ptr::from_mut::<c_int>(&mut fds[0])) } == 0),
assert_eq!(
unsafe { libc::pipe(std::ptr::from_mut::<c_int>(&mut fds[0])) },
0,
"Failed to create pipe"
);

Expand All @@ -215,8 +216,9 @@ mod linux_only {
use std::os::unix::io::FromRawFd;

let mut fds: [c_int; 2] = [0, 0];
assert!(
(unsafe { libc::pipe(std::ptr::from_mut::<c_int>(&mut fds[0])) } == 0),
assert_eq!(
unsafe { libc::pipe(std::ptr::from_mut::<c_int>(&mut fds[0])) },
0,
"Failed to create pipe"
);

Expand Down
Loading