mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-03 18:38:21 +00:00
Edition 2024 prep: Escape r#gen
and remove redundant ref (#11922)
Three edition 2021 compatible sets of changes in preparation for the edition 2025 split out from #11724. In edition 2025, `gen` is a keyword, so we escape it as `r#gen`. `ref` and `ref mut` are not allowed anymore for `&T` and `&mut T`, so we remove them. `cargo fmt` now formats inside of macros, which the 2021 formatter doesn't undo.
This commit is contained in:
parent
6fdcaa8a4b
commit
d712ff243e
16 changed files with 63 additions and 44 deletions
|
@ -42,7 +42,7 @@ impl schemars::JsonSchema for PythonVersion {
|
|||
String::from("PythonVersion")
|
||||
}
|
||||
|
||||
fn json_schema(_gen: &mut schemars::gen::SchemaGenerator) -> schemars::schema::Schema {
|
||||
fn json_schema(_gen: &mut schemars::r#gen::SchemaGenerator) -> schemars::schema::Schema {
|
||||
schemars::schema::SchemaObject {
|
||||
instance_type: Some(schemars::schema::InstanceType::String.into()),
|
||||
string: Some(Box::new(schemars::schema::StringValidation {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue