Skip to content

Commit

Permalink
chore(deps): update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ChieloNewctle committed Feb 29, 2024
1 parent 4fa1012 commit d0da975
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
10 changes: 3 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ name = "general_sam"
crate-type = ["cdylib"]

[dependencies]
general-sam = { version = "0.6.1", features = ["all"] }
pyo3 = { version = "0.20.0", features = [
"extension-module",
"abi3-py38",
"generate-import-lib",
] }
either = "1.9.0"
either = "1.10.0"
general-sam = { version = "0.7.0", features = ["all"] }
pyo3 = { version = "0.20.3", features = ["extension-module", "generate-import-lib", "abi3-py38"] }
13 changes: 5 additions & 8 deletions src/sam.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,21 +243,18 @@ impl GeneralSAM {
GeneralSAMState(for_both_with_side!(
self.0.as_ref(),
side,
x => side(RustBoxBisectGeneralSAMState {
sam: x.clone(),
node_id: SAM_ROOT_NODE_ID,
})
x => side(RustBoxBisectGeneralSAMState::new(
x.clone(),
SAM_ROOT_NODE_ID,
)),
))
}

pub fn get_state(&self, node_id: usize) -> GeneralSAMState {
GeneralSAMState(for_both_with_side!(
self.0.as_ref(),
side,
x => side(RustBoxBisectGeneralSAMState {
sam: x.clone(),
node_id,
})
x => side(RustBoxBisectGeneralSAMState::new(x.clone(), node_id)),
))
}

Expand Down
3 changes: 3 additions & 0 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ macro_rules! for_both_with_side {
}
}
};
($value:expr, $side:ident, $pattern:pat => $result:expr,) => {
for_both_with_side!($value, $side, $pattern => $result)
}
}

pub use for_both_with_side;
Expand Down

0 comments on commit d0da975

Please sign in to comment.