Skip to content

Commit

Permalink
Merge 2fb7475 into 3fb4a87
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonbrad committed Apr 30, 2023
2 parents 3fb4a87 + 2fb7475 commit 124265b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions clafrica-lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ pub mod bst {
use std::{cell::RefCell, rc::Rc};

#[derive(Debug)]
pub struct Node<'a> {
neighbors: RefCell<HashMap<char, Rc<Node<'a>>>>,
pub struct Node {
neighbors: RefCell<HashMap<char, Rc<Node>>>,
depth: i32,
value: RefCell<Option<String>>,
}

impl<'a> Default for Node<'a> {
impl Default for Node {
fn default() -> Self {
Self::new(0)
}
}

impl Node<'_> {
impl Node {
/// Initialize a new node.
pub fn new(depth: i32) -> Self {
Self {
Expand Down
2 changes: 1 addition & 1 deletion clafrica/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use clafrica_lib::bst;

struct Cursor<'a> {
stack: Vec<&'a str>,
node: &'a bst::Node<'a>,
node: &'a bst::Node,
}

fn run() {
Expand Down

0 comments on commit 124265b

Please sign in to comment.