Skip to content

Commit

Permalink
fix(alpha): build problems
Browse files Browse the repository at this point in the history
  • Loading branch information
clearloop committed Feb 22, 2024
1 parent 769f919 commit 16d9b95
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions alpha/state/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
#![no_std]

use alpha_io::{Resource, State};
use alpha_io::{Label, Resource};
use gstd::prelude::*;

#[gmeta::metawasm]
pub mod metafns {
pub type State = State;
pub type State = alpha_io::State;

/// Returns all domains (pages) that matches the search input.
pub fn labels(state: State) -> Vec<Label> {
pub fn labels(_state: State) -> Vec<Label> {
Label::list()
}

/// Search all resouces matching labels
pub fn search(state: State, label: Label) -> Vec<Resource> {
state.iter().filter(|s| s.labels.contains(label)).collect()
state
.into_iter()
.filter(|s| s.labels.contains(&label))
.collect()
}
}

0 comments on commit 16d9b95

Please sign in to comment.