Skip to content

Commit

Permalink
remove no-longer-needed attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
dwrensha committed Sep 3, 2023
1 parent 649c39d commit 488f724
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions capnp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ pub enum ErrorKind {

impl Error {
/// Writes to the `extra` field. Does nothing if the "alloc" feature is not enabled.
/// This is intended to be used with the `write!()` macro from core.
pub fn write_fmt(&mut self, fmt: core::fmt::Arguments<'_>) {
#[cfg(feature = "alloc")]
{
Expand Down
2 changes: 0 additions & 2 deletions capnp/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ impl StructSchema {
if let Some(field) = self.find_field_by_name(name)? {
Ok(field)
} else {
// error needs to be mutable only when the alloc feature is enabled
#[allow(unused_mut)]
let mut error = crate::Error::from_kind(crate::ErrorKind::FieldNotFound);
write!(error, "{}", name);
Err(error)
Expand Down

0 comments on commit 488f724

Please sign in to comment.