mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix: wrong type in iterator binding
This commit is contained in:
parent
cddd0727ef
commit
457c2a5c06
1 changed files with 2 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
use std::{collections::{hash_set, BTreeSet}, ops::Deref};
|
use std::{collections::{btree_set, BTreeSet}, ops::Deref};
|
||||||
|
|
||||||
use mlua::{AnyUserData, IntoLuaMulti, Lua, MetaMethod, UserDataMethods, UserDataRefMut};
|
use mlua::{AnyUserData, IntoLuaMulti, Lua, MetaMethod, UserDataMethods, UserDataRefMut};
|
||||||
use yazi_plugin::{bindings::Cast, url::Url};
|
use yazi_plugin::{bindings::Cast, url::Url};
|
||||||
|
|
@ -28,7 +28,7 @@ impl Selected {
|
||||||
|
|
||||||
reg.add_meta_method(MetaMethod::Pairs, |lua, me, ()| {
|
reg.add_meta_method(MetaMethod::Pairs, |lua, me, ()| {
|
||||||
let iter = lua.create_function(
|
let iter = lua.create_function(
|
||||||
|lua, mut iter: UserDataRefMut<Iter<hash_set::Iter<yazi_shared::fs::Url>, _>>| {
|
|lua, mut iter: UserDataRefMut<Iter<btree_set::Iter<yazi_shared::fs::Url>, _>>| {
|
||||||
if let Some(next) = iter.next() {
|
if let Some(next) = iter.next() {
|
||||||
(next.0, Url::cast(lua, next.1.clone())?).into_lua_multi(lua)
|
(next.0, Url::cast(lua, next.1.clone())?).into_lua_multi(lua)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue