Skip to content

Commit 547a848

Browse files
committed
remove no-longer-needed attribute
1 parent d394db1 commit 547a848

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

capnp/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ pub enum ErrorKind {
401401

402402
impl Error {
403403
/// 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.
404405
pub fn write_fmt(&mut self, fmt: core::fmt::Arguments<'_>) {
405406
#[cfg(feature = "alloc")]
406407
{

capnp/src/schema.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ impl StructSchema {
7070
if let Some(field) = self.find_field_by_name(name)? {
7171
Ok(field)
7272
} else {
73-
// error needs to be mutable only when the alloc feature is enabled
74-
#[allow(unused_mut)]
7573
let mut error = crate::Error::from_kind(crate::ErrorKind::FieldNotFound);
7674
write!(error, "{}", name);
7775
Err(error)

0 commit comments

Comments
 (0)