@@ -80,30 +80,18 @@ enum ProgramOptionsError {
8080}
8181
8282#[ cfg( all( unix, not( target_vendor = "apple" ) , not( target_os = "cygwin" ) ) ) ]
83- #[ expect(
84- clippy:: unnecessary_wraps,
85- reason = "fn sig must match on all platforms"
86- ) ]
87- fn preload_strings ( ) -> UResult < ( & ' static str , & ' static str ) > {
88- Ok ( ( "LD_PRELOAD" , "so" ) )
83+ fn preload_strings ( ) -> ( & ' static str , & ' static str ) {
84+ ( "LD_PRELOAD" , "so" )
8985}
9086
9187#[ cfg( target_vendor = "apple" ) ]
92- #[ expect(
93- clippy:: unnecessary_wraps,
94- reason = "fn sig must match on all platforms"
95- ) ]
96- fn preload_strings ( ) -> UResult < ( & ' static str , & ' static str ) > {
97- Ok ( ( "DYLD_LIBRARY_PATH" , "dylib" ) )
88+ fn preload_strings ( ) -> ( & ' static str , & ' static str ) {
89+ ( "DYLD_LIBRARY_PATH" , "dylib" )
9890}
9991
10092#[ cfg( target_os = "cygwin" ) ]
101- #[ expect(
102- clippy:: unnecessary_wraps,
103- reason = "fn sig must match on all platforms"
104- ) ]
105- fn preload_strings ( ) -> UResult < ( & ' static str , & ' static str ) > {
106- Ok ( ( "LD_PRELOAD" , "dll" ) )
93+ fn preload_strings ( ) -> ( & ' static str , & ' static str ) {
94+ ( "LD_PRELOAD" , "dll" )
10795}
10896
10997fn check_option ( matches : & ArgMatches , name : & str ) -> Result < BufferType , ProgramOptionsError > {
@@ -146,7 +134,7 @@ fn get_preload_env(tmp_dir: &TempDir) -> UResult<(String, PathBuf)> {
146134 use std:: fs:: File ;
147135 use std:: io:: Write ;
148136
149- let ( preload, extension) = preload_strings ( ) ? ;
137+ let ( preload, extension) = preload_strings ( ) ;
150138 let inject_path = tmp_dir. path ( ) . join ( "libstdbuf" ) . with_extension ( extension) ;
151139
152140 let mut file = File :: create ( & inject_path) ?;
@@ -157,7 +145,7 @@ fn get_preload_env(tmp_dir: &TempDir) -> UResult<(String, PathBuf)> {
157145
158146#[ cfg( feature = "feat_external_libstdbuf" ) ]
159147fn get_preload_env ( _tmp_dir : & TempDir ) -> UResult < ( String , PathBuf ) > {
160- let ( preload, extension) = preload_strings ( ) ? ;
148+ let ( preload, extension) = preload_strings ( ) ;
161149
162150 // Use the directory provided at compile time via LIBSTDBUF_DIR environment variable
163151 // This will fail to compile if LIBSTDBUF_DIR is not set, which is the desired behavior
0 commit comments