diff --git a/src/macros.rs b/src/macros.rs index c8ee590b6cc..a9bc89544d8 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -401,7 +401,7 @@ fn rewrite_macro_inner( handle_vec_semi(context, shape, arg_vec, macro_name, style) } else { // If we are rewriting `vec!` macro or other special macros, - // then we can rewrite this as an usual array literal. + // then we can rewrite this as a usual array literal. // Otherwise, we must preserve the original existence of trailing comma. let macro_name = ¯o_name.as_str(); let mut force_trailing_comma = if trailing_comma { diff --git a/src/string.rs b/src/string.rs index 0cb9d817ca2..64ae15672df 100644 --- a/src/string.rs +++ b/src/string.rs @@ -153,7 +153,7 @@ pub(crate) fn rewrite_string<'a>( wrap_str(result, fmt.config.max_width(), fmt.shape) } -/// Returns the index to the end of the URL if the split at index of the given string includes an +/// Returns the index to the end of the URL if the split at index of the given string includes a /// URL or alike. Otherwise, returns `None`. fn detect_url(s: &[&str], index: usize) -> Option { let start = match s[..=index].iter().rposition(|g| is_whitespace(g)) { diff --git a/tests/source/cfg_if/detect/arch/x86.rs b/tests/source/cfg_if/detect/arch/x86.rs index 50d5cfa87c4..4c71a2c6ab9 100644 --- a/tests/source/cfg_if/detect/arch/x86.rs +++ b/tests/source/cfg_if/detect/arch/x86.rs @@ -2,7 +2,7 @@ //! //! The features are detected using the `detect_features` function below. //! This function uses the CPUID instruction to read the feature flags from the -//! CPU and encodes them in an `usize` where each bit position represents +//! CPU and encodes them in a `usize` where each bit position represents //! whether a feature is available (bit is set) or unavaiable (bit is cleared). //! //! The enum `Feature` is used to map bit positions to feature names, and the diff --git a/tests/target/cfg_if/detect/arch/x86.rs b/tests/target/cfg_if/detect/arch/x86.rs index 9219a4a577f..b985dd8caa1 100644 --- a/tests/target/cfg_if/detect/arch/x86.rs +++ b/tests/target/cfg_if/detect/arch/x86.rs @@ -2,7 +2,7 @@ //! //! The features are detected using the `detect_features` function below. //! This function uses the CPUID instruction to read the feature flags from the -//! CPU and encodes them in an `usize` where each bit position represents +//! CPU and encodes them in a `usize` where each bit position represents //! whether a feature is available (bit is set) or unavaiable (bit is cleared). //! //! The enum `Feature` is used to map bit positions to feature names, and the