parsers: fix accidental MSRV bump
The previous code didn't build with 1.78:
```
error[E0716]: temporary value dropped while borrowed
--> parsers/src/data_forms/validate.rs:394:46
|
380 | let value = match self {
| ----- borrow later stored here
...
394 | Datatype::UserDefined(value) => &format!("x:{value}"),
| ^^^^^^^^^^^^^^^^^^^-
| | |
| | temporary value is freed at the end of this statement
| creates a temporary value which is freed while still in use
|
= note: consider using a `let` binding to create a longer lived value
= note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0716]: temporary value dropped while borrowed
--> parsers/src/data_forms/validate.rs:395:51
|
380 | let value = match self {
| ----- borrow later stored here
...
395 | Datatype::Other { prefix, value } => &format!("{prefix}:{value}"),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^-
| | |
| | temporary value is freed at the end of this statement
| creates a temporary value which is freed while still in use
|
= note: consider using a `let` binding to create a longer lived value
= note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0716`.
```
This seems like a silly reason to pull up the compiler version
requirements, so I fixed it with a trivial modification.
This commit is contained in:
parent
6ade419030
commit
8d8f3fea37
1 changed files with 3 additions and 3 deletions
|
|
@ -391,10 +391,10 @@ impl Display for Datatype {
|
|||
Datatype::Short => "xs:short",
|
||||
Datatype::String => "xs:string",
|
||||
Datatype::Time => "xs:time",
|
||||
Datatype::UserDefined(value) => &format!("x:{value}"),
|
||||
Datatype::Other { prefix, value } => &format!("{prefix}:{value}"),
|
||||
Datatype::UserDefined(value) => return write!(f, "x:{value}"),
|
||||
Datatype::Other { prefix, value } => return write!(f, "{prefix}:{value}"),
|
||||
};
|
||||
write!(f, "{value}")
|
||||
f.write_str(value)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue