chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
385936c
)
extension traits: Use extend::ext
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Mon, 8 Mar 2021 20:30:19 +0000
(20:30 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Mon, 8 Mar 2021 20:30:19 +0000
(20:30 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/utils.rs
patch
|
blob
|
history
diff --git
a/src/utils.rs
b/src/utils.rs
index e525e6e56cd7279c1d5ca6cb1bbe7957914d7c06..c264c738c29ed289c199faabb858bdd4d20e1d16 100644
(file)
--- a/
src/utils.rs
+++ b/
src/utils.rs
@@
-110,11
+110,8
@@
impl<T> OptionExt for Option<T> {
// https://github.com/rust-lang/rust/issues/32255 :-(
-pub trait LocalFileExt {
- fn close(self) -> Result<(), io::Error>;
-}
-
-impl LocalFileExt for fs::File {
+#[ext(pub, name=LocalFileExt, supertraits=Sized)]
+impl fs::File {
#[throws(io::Error)]
fn close(self) {
let r = unsafe {