File tree Expand file tree Collapse file tree 2 files changed +1
-2
lines changed Expand file tree Collapse file tree 2 files changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -401,6 +401,7 @@ pub enum ErrorKind {
401
401
402
402
impl Error {
403
403
/// Writes to the `extra` field. Does nothing if the "alloc" feature is not enabled.
404
+ /// This is intended to be used with the `write!()` macro from core.
404
405
pub fn write_fmt ( & mut self , fmt : core:: fmt:: Arguments < ' _ > ) {
405
406
#[ cfg( feature = "alloc" ) ]
406
407
{
Original file line number Diff line number Diff line change @@ -70,8 +70,6 @@ impl StructSchema {
70
70
if let Some ( field) = self . find_field_by_name ( name) ? {
71
71
Ok ( field)
72
72
} else {
73
- // error needs to be mutable only when the alloc feature is enabled
74
- #[ allow( unused_mut) ]
75
73
let mut error = crate :: Error :: from_kind ( crate :: ErrorKind :: FieldNotFound ) ;
76
74
write ! ( error, "{}" , name) ;
77
75
Err ( error)
You can’t perform that action at this time.
0 commit comments