mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Run rustfmt with respect to Cargo.toml edition
This commit is contained in:
parent
1fe0b8c03f
commit
b437dca4bd
4 changed files with 78 additions and 0 deletions
|
@ -235,6 +235,15 @@ impl FromStr for Edition {
|
|||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for Edition {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.write_str(match self {
|
||||
Edition::Edition2015 => "2015",
|
||||
Edition::Edition2018 => "2018",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl Dependency {
|
||||
pub fn crate_id(&self) -> CrateId {
|
||||
self.crate_id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue