Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5c2e274

Browse files
authored
Rollup merge ofrust-lang#125730 - mu001999-contrib:clippy-fix, r=oli-obk
Apply `x clippy --fix` and `x fmt` on Rustc<!--If this PR is related to an unstable feature or an otherwise tracked effort,please link to the relevant tracking issue here. If you don't know of a relatedtracking issue or there are none, feel free to ignore this.This PR will get automatically assigned to a reviewer. In case you would likea specific user to review your work, you can assign it to them by using r​? <reviewer name>-->Just run `x clippy --fix` and `x fmt`, and remove some changes like `impl Default`.
2 parents9fe1803 +6f01ba7 commit5c2e274

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

‎proc_macro/src/bridge/fxhash.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ impl Hasher for FxHasher {
6969
hash.add_to_hash(u16::from_ne_bytes(bytes[..2].try_into().unwrap())asusize);
7070
bytes =&bytes[2..];
7171
}
72-
if(size_of::<usize>() >1) && bytes.len() >=1{
72+
if(size_of::<usize>() >1) &&!bytes.is_empty(){
7373
hash.add_to_hash(bytes[0]asusize);
7474
}
7575
self.hash = hash.hash;

‎proc_macro/src/bridge/rpc.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,9 @@ impl From<Box<dyn Any + Send>> for PanicMessage {
264264
}
265265
}
266266

267-
implInto<Box<dynAny +Send>>forPanicMessage{
268-
fninto(self) ->Box<dynAny +Send>{
269-
matchself{
267+
implFrom<PanicMessage>forBox<dynAny +Send>{
268+
fnfrom(val:PanicMessage) ->Self{
269+
matchval{
270270
PanicMessage::StaticStr(s) =>Box::new(s),
271271
PanicMessage::String(s) =>Box::new(s),
272272
PanicMessage::Unknown =>{

‎test/src/cli.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ Test Attributes:
200200
pubfnparse_opts(args:&[String]) ->Option<OptRes>{
201201
// Parse matches.
202202
let opts =optgroups();
203-
let binary = args.get(0).map(|c|&**c).unwrap_or("...");
203+
let binary = args.first().map(|c|&**c).unwrap_or("...");
204204
let args = args.get(1..).unwrap_or(args);
205205
let matches =match opts.parse(args){
206206
Ok(m) => m,

‎test/src/term/terminfo/parm.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ fn format(val: Param, op: FormatOp, flags: Flags) -> Result<Vec<u8>, String> {
524524
}else{
525525
letmut s_ =Vec::with_capacity(flags.width);
526526
s_.extend(repeat(b' ').take(n));
527-
s_.extend(s.into_iter());
527+
s_.extend(s);
528528
s = s_;
529529
}
530530
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp