Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi committed Oct 29, 2024
1 parent 63d97f8 commit 66d3b8c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions yazi-fm/src/lives/finder.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::ops::Deref;

use mlua::{AnyUserData, UserData};
use mlua::{AnyUserData, MetaMethod, UserData, UserDataMethods};

use super::SCOPE;

Expand All @@ -21,4 +21,8 @@ impl Finder {
}
}

impl UserData for Finder {}
impl UserData for Finder {
fn add_methods<M: UserDataMethods<Self>>(methods: &mut M) {
methods.add_meta_method(MetaMethod::ToString, |_, me, ()| Ok(me.filter.to_string()));
}
}

0 comments on commit 66d3b8c

Please sign in to comment.