We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 701e293 commit b92038bCopy full SHA for b92038b
src/tree.rs
@@ -43,14 +43,14 @@ pub enum TreeWalkMode {
43
}
44
45
/// Possible return codes for tree walking callback functions.
46
-#[allow(dead_code)]
+#[repr(i32)]
47
pub enum TreeWalkResult {
48
/// Continue with the traversal as normal.
49
Ok = 0,
50
/// Skip the current node (in pre-order mode).
51
Skip = 1,
52
/// Completely stop the traversal.
53
- Abort = -1,
+ Abort = raw::GIT_EUSER,
54
55
56
impl Into<i32> for TreeWalkResult {
@@ -520,7 +520,7 @@ mod tests {
520
0
521
}).unwrap();
522
assert_eq!(ct, 1);
523
-
+
524
let mut ct = 0;
525
tree.walk(TreeWalkMode::PreOrder, |_, entry| {
526
assert_eq!(entry.name(), Some("foo"));
0 commit comments