File tree Expand file tree Collapse file tree 12 files changed +59
-33
lines changed
crates/xtask-stale-label/src Expand file tree Collapse file tree 12 files changed +59
-33
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ windows-sys = "0.48"
9595
9696[package ]
9797name = " cargo"
98- version = " 0.73.0 "
98+ version = " 0.73.1 "
9999edition = " 2021"
100100license = " MIT OR Apache-2.0"
101101homepage = " https://crates.io"
@@ -181,10 +181,12 @@ fwdansi.workspace = true
181181workspace = true
182182features = [
183183 " Win32_Foundation" ,
184+ " Win32_Security" ,
184185 " Win32_Storage_FileSystem" ,
186+ " Win32_System_IO" ,
185187 " Win32_System_Console" ,
186- " Win32_System_Threading" ,
187188 " Win32_System_JobObjects" ,
189+ " Win32_System_Threading" ,
188190]
189191
190192[dev-dependencies ]
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ fn main() {
3434
3535 for ( label, value) in autolabel. iter ( ) {
3636 let Some ( trigger_files) = value. get ( "trigger_files" ) else {
37- continue
37+ continue ;
3838 } ;
3939 let trigger_files = trigger_files. as_array ( ) . expect ( "an array" ) ;
4040 let missing_files: Vec < _ > = trigger_files
Original file line number Diff line number Diff line change 55//! rough outline is:
66//!
77//! 1. Resolve the dependency graph (see [`ops::resolve`]).
8- //! 2. Download any packages needed (see [`PackageSet`](crate::core::PackageSet)) .
8+ //! 2. Download any packages needed (see [`PackageSet`].
99//! 3. Generate a list of top-level "units" of work for the targets the user
1010//! requested on the command-line. Each [`Unit`] corresponds to a compiler
1111//! invocation. This is done in this module ([`UnitGenerator::generate_root_units`]).
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ pub fn certificate_check(
141141 let Some ( host_key) = cert. as_hostkey ( ) else {
142142 // Return passthrough for TLS X509 certificates to use whatever validation
143143 // was done in git2.
144- return Ok ( CertificateCheckStatus :: CertificatePassthrough )
144+ return Ok ( CertificateCheckStatus :: CertificatePassthrough ) ;
145145 } ;
146146 // If a nonstandard port is in use, check for that first.
147147 // The fallback to check without a port is handled in the HostKeyNotFound handler.
@@ -611,10 +611,18 @@ impl KnownHost {
611611}
612612
613613fn hashed_hostname_matches ( host : & str , hashed : & str ) -> bool {
614- let Some ( ( b64_salt, b64_host) ) = hashed. split_once ( '|' ) else { return false ; } ;
615- let Ok ( salt) = STANDARD . decode ( b64_salt) else { return false ; } ;
616- let Ok ( hashed_host) = STANDARD . decode ( b64_host) else { return false ; } ;
617- let Ok ( mut mac) = hmac:: Hmac :: < sha1:: Sha1 > :: new_from_slice ( & salt) else { return false ; } ;
614+ let Some ( ( b64_salt, b64_host) ) = hashed. split_once ( '|' ) else {
615+ return false ;
616+ } ;
617+ let Ok ( salt) = STANDARD . decode ( b64_salt) else {
618+ return false ;
619+ } ;
620+ let Ok ( hashed_host) = STANDARD . decode ( b64_host) else {
621+ return false ;
622+ } ;
623+ let Ok ( mut mac) = hmac:: Hmac :: < sha1:: Sha1 > :: new_from_slice ( & salt) else {
624+ return false ;
625+ } ;
618626 mac. update ( host. as_bytes ( ) ) ;
619627 let result = mac. finalize ( ) . into_bytes ( ) ;
620628 hashed_host == & result[ ..]
Original file line number Diff line number Diff line change @@ -808,7 +808,9 @@ impl<'cfg> Downloads<'cfg> {
808808 /// Updates the state of the progress bar for downloads.
809809 fn tick ( & self ) -> CargoResult < ( ) > {
810810 let mut progress = self . progress . borrow_mut ( ) ;
811- let Some ( progress) = progress. as_mut ( ) else { return Ok ( ( ) ) ; } ;
811+ let Some ( progress) = progress. as_mut ( ) else {
812+ return Ok ( ( ) ) ;
813+ } ;
812814
813815 // Since the sparse protocol discovers dependencies as it goes,
814816 // it's not possible to get an accurate progress indication.
Original file line number Diff line number Diff line change @@ -887,7 +887,7 @@ impl<'cfg> Source for RegistrySource<'cfg> {
887887
888888impl RegistryConfig {
889889 /// File name of [`RegistryConfig`].
890- const NAME : & str = "config.json" ;
890+ const NAME : & ' static str = "config.json" ;
891891}
892892
893893/// Get the maximum upack size that Cargo permits
Original file line number Diff line number Diff line change @@ -73,7 +73,8 @@ pub fn public_token_from_credential(
7373 source_id : & SourceId ,
7474 mutation : Option < & ' _ Mutation < ' _ > > ,
7575) -> CargoResult < Secret < String > > {
76- let RegistryCredentialConfig :: AsymmetricKey ( ( secret_key, secret_key_subject) ) = credential else {
76+ let RegistryCredentialConfig :: AsymmetricKey ( ( secret_key, secret_key_subject) ) = credential
77+ else {
7778 anyhow:: bail!( "credential must be an asymmetric secret key" )
7879 } ;
7980
Original file line number Diff line number Diff line change @@ -207,7 +207,11 @@ impl DocFragment {
207207 let syn:: Meta :: NameValue ( nv) = & attr. meta else {
208208 anyhow:: bail!( "unsupported attr meta for {:?}" , attr. meta. path( ) )
209209 } ;
210- let syn:: Expr :: Lit ( syn:: ExprLit { lit : syn:: Lit :: Str ( lit) , .. } ) = & nv. value else {
210+ let syn:: Expr :: Lit ( syn:: ExprLit {
211+ lit : syn:: Lit :: Str ( lit) ,
212+ ..
213+ } ) = & nv. value
214+ else {
211215 anyhow:: bail!( "only string literals are supported" )
212216 } ;
213217 Ok ( Self {
@@ -373,16 +377,21 @@ fn unindent_doc_fragments(docs: &mut [DocFragment]) {
373377 let Some ( min_indent) = docs
374378 . iter ( )
375379 . map ( |fragment| {
376- fragment. doc . as_str ( ) . lines ( ) . fold ( usize:: MAX , |min_indent, line| {
377- if line. chars ( ) . all ( |c| c. is_whitespace ( ) ) {
378- min_indent
379- } else {
380- // Compare against either space or tab, ignoring whether they are
381- // mixed or not.
382- let whitespace = line. chars ( ) . take_while ( |c| * c == ' ' || * c == '\t' ) . count ( ) ;
383- min_indent. min ( whitespace)
384- }
385- } )
380+ fragment
381+ . doc
382+ . as_str ( )
383+ . lines ( )
384+ . fold ( usize:: MAX , |min_indent, line| {
385+ if line. chars ( ) . all ( |c| c. is_whitespace ( ) ) {
386+ min_indent
387+ } else {
388+ // Compare against either space or tab, ignoring whether they are
389+ // mixed or not.
390+ let whitespace =
391+ line. chars ( ) . take_while ( |c| * c == ' ' || * c == '\t' ) . count ( ) ;
392+ min_indent. min ( whitespace)
393+ }
394+ } )
386395 } )
387396 . min ( )
388397 else {
Original file line number Diff line number Diff line change @@ -2835,7 +2835,9 @@ fn parse_unstable_lints<T: Deserialize<'static>>(
28352835 config : & Config ,
28362836 warnings : & mut Vec < String > ,
28372837) -> CargoResult < Option < T > > {
2838- let Some ( lints) = lints else { return Ok ( None ) ; } ;
2838+ let Some ( lints) = lints else {
2839+ return Ok ( None ) ;
2840+ } ;
28392841
28402842 if !config. cli_unstable ( ) . lints {
28412843 warn_for_lint_feature ( config, warnings) ;
@@ -2878,7 +2880,9 @@ switch to nightly channel you can pass
28782880}
28792881
28802882fn verify_lints ( lints : Option < TomlLints > ) -> CargoResult < Option < TomlLints > > {
2881- let Some ( lints) = lints else { return Ok ( None ) ; } ;
2883+ let Some ( lints) = lints else {
2884+ return Ok ( None ) ;
2885+ } ;
28822886
28832887 for ( tool, lints) in & lints {
28842888 let supported = [ "rust" , "clippy" , "rustdoc" ] ;
You can’t perform that action at this time.
0 commit comments