Skip to content

Commit 60d857b

Browse files
committed
style, lifetime annotations
1 parent b2497b5 commit 60d857b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/uucore/src/lib/features/checksum.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ fn get_filename_for_output(filename: &OsStr, input_is_stdin: bool) -> String {
701701
fn get_expected_digest_as_hex_string(
702702
line_info: &LineInfo,
703703
len_hint: Option<usize>,
704-
) -> Option<Cow<str>> {
704+
) -> Option<Cow<'_, str>> {
705705
let ck = &line_info.checksum;
706706

707707
let against_hint = |len| len_hint.is_none_or(|l| l == len);
@@ -989,7 +989,7 @@ fn process_checksum_line(
989989
process_non_algo_based_line(i, &line_info, cli_algo, cli_algo_length, opts)
990990
} else {
991991
// We have no clue of what algorithm to use
992-
return Err(LineCheckError::ImproperlyFormatted);
992+
Err(LineCheckError::ImproperlyFormatted)
993993
}
994994
}
995995

src/uucore/src/lib/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ pub fn os_str_as_bytes(os_string: &OsStr) -> Result<&[u8], NonUtf8OsStrError> {
344344
///
345345
/// This is always lossless on unix platforms,
346346
/// and wraps [`OsStr::to_string_lossy`] on non-unix platforms.
347-
pub fn os_str_as_bytes_lossy(os_string: &OsStr) -> Cow<[u8]> {
347+
pub fn os_str_as_bytes_lossy(os_string: &OsStr) -> Cow<'_, [u8]> {
348348
#[cfg(unix)]
349349
return Cow::from(os_string.as_bytes());
350350

0 commit comments

Comments
 (0)