Format all the let chains in compiler
This commit is contained in:
parent
2763ca50da
commit
b2d2184ede
206 changed files with 3120 additions and 2228 deletions
|
@ -186,10 +186,14 @@ pub fn invalid_output_for_target(sess: &Session, crate_type: CrateType) -> bool
|
|||
return true;
|
||||
}
|
||||
}
|
||||
if let CrateType::ProcMacro | CrateType::Dylib = crate_type && sess.target.only_cdylib {
|
||||
if let CrateType::ProcMacro | CrateType::Dylib = crate_type
|
||||
&& sess.target.only_cdylib
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if let CrateType::Executable = crate_type && !sess.target.executables {
|
||||
if let CrateType::Executable = crate_type
|
||||
&& !sess.target.executables
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -161,7 +161,9 @@ pub fn extra_compiler_flags() -> Option<(Vec<String>, bool)> {
|
|||
|
||||
pub(crate) fn is_ascii_ident(string: &str) -> bool {
|
||||
let mut chars = string.chars();
|
||||
if let Some(start) = chars.next() && (start.is_ascii_alphabetic() || start == '_') {
|
||||
if let Some(start) = chars.next()
|
||||
&& (start.is_ascii_alphabetic() || start == '_')
|
||||
{
|
||||
chars.all(|char| char.is_ascii_alphanumeric() || char == '_')
|
||||
} else {
|
||||
false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue