File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -437,14 +437,9 @@ impl Config {
437437
438438 repo. enabled . get_or_insert ( true ) ;
439439
440- if repo. pubkey . is_none ( ) {
441- match repo. name . as_str ( ) {
442- "soarpkgs" => {
443- repo. pubkey =
444- Some ( "https://raw.githubusercontent.com/pkgforge/soarpkgs/refs/heads/main/keys/minisign.pub" . to_string ( ) )
445- }
446- _ => { }
447- }
440+ if repo. pubkey . is_none ( ) && repo. name . as_str ( ) == "soarpkgs" {
441+ repo. pubkey =
442+ Some ( "https://raw.githubusercontent.com/pkgforge/soarpkgs/refs/heads/main/keys/minisign.pub" . to_string ( ) )
448443 }
449444 }
450445
Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ impl PackageProvide {
4444 }
4545
4646 pub fn from_string ( provide : & str ) -> Self {
47- let ( symlink_to_bin, provide) = if provide. starts_with ( '@' ) {
48- ( true , & provide [ 1 .. ] )
47+ let ( symlink_to_bin, provide) = if let Some ( stripped ) = provide. strip_prefix ( '@' ) {
48+ ( true , stripped )
4949 } else {
5050 ( false , provide)
5151 } ;
Original file line number Diff line number Diff line change @@ -67,11 +67,11 @@ mod tests {
6767 fn test_platform ( ) {
6868 #[ cfg( target_arch = "x86_64" ) ]
6969 #[ cfg( target_os = "linux" ) ]
70- assert_eq ! ( platform( ) , "x86_64-Linux " ) ;
70+ assert_eq ! ( platform( ) , "x86_64-linux " ) ;
7171
7272 #[ cfg( target_arch = "aarch64" ) ]
7373 #[ cfg( target_os = "linux" ) ]
74- assert_eq ! ( platform( ) , "aarch64-Linux " ) ;
74+ assert_eq ! ( platform( ) , "aarch64-linux " ) ;
7575 }
7676
7777 #[ test]
You can’t perform that action at this time.
0 commit comments