Skip to content

Commit 8cc8d93

Browse files
feat(buf): add into_parts for BufResult (compio-rs#712)
* feat: add into_parts for BufResult * chore: ignore all .idea dir, not just the /.idea
1 parent a878c35 commit 8cc8d93

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Editor directories
99
/.vscode
1010
/.zed
11-
/.idea
11+
.idea
1212

1313
# Bacon config
1414
bacon.toml

compio-buf/src/buf_result.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ impl<T, B> BufResult<T, B> {
9090
pub fn unwrap(self) -> (T, B) {
9191
(self.0.unwrap(), self.1)
9292
}
93+
94+
/// Returns the parts, consuming the `self` value.
95+
#[inline]
96+
pub fn into_parts(self) -> (io::Result<T>, B) {
97+
(self.0, self.1)
98+
}
9399
}
94100

95101
impl<T, B> From<(io::Result<T>, B)> for BufResult<T, B> {

0 commit comments

Comments
 (0)