Skip to content

Commit b5ef91f

Browse files
Remove unused functions from lib.rs
1 parent f3efaf6 commit b5ef91f

1 file changed

Lines changed: 0 additions & 27 deletions

File tree

src/rust/src/lib.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -151,17 +151,8 @@ fn graph_builder_add_edges(
151151
}
152152
}
153153
}
154-
#[extendr]
155-
fn graph_builder_build(mut b: ExternalPtr<GraphBuilder>) -> ExternalPtr<CaugiGraph> {
156-
let g = b
157-
.as_mut()
158-
.finalize_in_place()
159-
.unwrap_or_else(|e| throw_r_error(e));
160-
ExternalPtr::new(g)
161-
}
162154

163155
// ── Constructors for class views ────────────────────────────────────────────────────────────────
164-
#[extendr]
165156
fn graphview_new(core: ExternalPtr<CaugiGraph>, class: &str) -> ExternalPtr<GraphView> {
166157
match class.trim().to_ascii_uppercase().as_str() {
167158
"DAG" => {
@@ -267,21 +258,6 @@ fn is_pdag_type_ptr(g: ExternalPtr<GraphView>) -> bool {
267258
Pdag::new(Arc::new(core.clone())).is_ok()
268259
}
269260

270-
#[extendr]
271-
fn validate_as_ptr(g: ExternalPtr<GraphView>, class: &str) -> Robj {
272-
let core = g.as_ref().core();
273-
let res = match class.trim().to_ascii_uppercase().as_str() {
274-
"DAG" => Dag::new(Arc::new(core.clone())).map(|_| (true, "".to_string())),
275-
"PDAG" | "CPDAG" => Pdag::new(Arc::new(core.clone())).map(|_| (true, "".to_string())),
276-
"UNKNOWN" | "" => Ok((true, "".to_string())),
277-
other => Err(format!("unknown graph class '{other}'")),
278-
};
279-
match res {
280-
Ok((ok, msg)) => list!(ok = ok, message = msg).into_robj(),
281-
Err(e) => list!(ok = false, message = e).into_robj(),
282-
}
283-
}
284-
285261
#[extendr]
286262
fn graph_class_ptr(g: ExternalPtr<GraphView>) -> String {
287263
match g.as_ref() {
@@ -439,10 +415,8 @@ extendr_module! {
439415
// builder + core
440416
fn graph_builder_new;
441417
fn graph_builder_add_edges;
442-
fn graph_builder_build;
443418

444419
// class factory
445-
fn graphview_new;
446420
fn graph_builder_build_view;
447421

448422
// queries
@@ -465,7 +439,6 @@ extendr_module! {
465439
// class tests + validator
466440
fn is_dag_type_ptr;
467441
fn is_pdag_type_ptr;
468-
fn validate_as_ptr;
469442

470443
// metrics
471444
fn shd_of_ptrs;

0 commit comments

Comments
 (0)