Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: Fix typo, from Navigation to Navigator #76

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ use cpy_binder::{cpy_enum, cpy_fn, cpy_fn_c, cpy_fn_py, cpy_module, cpy_struct};
use lazy_static::lazy_static;
use std::sync::Mutex;

struct NavigationManager {
struct NavigatorManager {
navigator: navigator_rs::Navigator,
}

lazy_static! {
static ref NAVIGATOR: Mutex<Option<NavigationManager>> = Mutex::new(None);
static ref NAVIGATOR: Mutex<Option<NavigatorManager>> = Mutex::new(None);
}

impl NavigationManager {
impl NavigatorManager {
fn get_instance() -> &'static Mutex<Option<Self>> {
if NAVIGATOR.lock().unwrap().is_none() {
*NAVIGATOR.lock().unwrap() = Some(NavigationManager {
*NAVIGATOR.lock().unwrap() = Some(NavigatorManager {
navigator: navigator_rs::Navigator::new(),
});
}
Expand All @@ -24,7 +24,7 @@ impl NavigationManager {

macro_rules! with_navigator {
() => {
NavigationManager::get_instance()
NavigatorManager::get_instance()
.lock()
.unwrap()
.as_mut()
Expand Down
Loading