aya: fix formatting

pull/29/head
Alessandro Decina 3 years ago
parent 12ea9f3500
commit d996a88de4

@ -214,9 +214,7 @@ impl Btf {
} }
pub(crate) fn type_name(&self, ty: &BtfType) -> Result<Option<Cow<'_, str>>, BtfError> { pub(crate) fn type_name(&self, ty: &BtfType) -> Result<Option<Cow<'_, str>>, BtfError> {
ty.name_offset() ty.name_offset().map(|off| self.string_at(off)).transpose()
.map(|off| self.string_at(off))
.transpose()
} }
pub(crate) fn err_type_name(&self, ty: &BtfType) -> Option<String> { pub(crate) fn err_type_name(&self, ty: &BtfType) -> Option<String> {

@ -87,7 +87,8 @@ impl SocketFilter {
if ret < 0 { if ret < 0 {
return Err(SocketFilterError::SoAttachBpfError { return Err(SocketFilterError::SoAttachBpfError {
io_error: io::Error::last_os_error(), io_error: io::Error::last_os_error(),
}.into()); }
.into());
} }
Ok(self.data.link(SocketFilterLink { Ok(self.data.link(SocketFilterLink {

Loading…
Cancel
Save