Thanks, clippy
This commit is contained in:
parent
b98e2abab6
commit
6bdc45fcd3
1 changed files with 2 additions and 2 deletions
|
@ -37,7 +37,7 @@ pub fn create_library(conn: &mut SqliteConnection, name: &str) -> Library {
|
|||
.expect("Error saving new post")
|
||||
}
|
||||
|
||||
pub fn get_tag<'a>(conn: &mut SqliteConnection, tag: &'a str) -> Option<Tag> {
|
||||
pub fn get_tag(conn: &mut SqliteConnection, tag: &str) -> Option<Tag> {
|
||||
use crate::schema::tags::dsl::*;
|
||||
tags.filter(name.eq(&tag))
|
||||
.select(Tag::as_select())
|
||||
|
@ -52,7 +52,7 @@ pub fn list_tags(conn: &mut SqliteConnection) -> Vec<Tag> {
|
|||
.expect("can't list tags")
|
||||
}
|
||||
|
||||
pub fn samples_with_tag<'a>(conn: &mut SqliteConnection, tag: &'a str) -> Vec<Sample> {
|
||||
pub fn samples_with_tag(conn: &mut SqliteConnection, tag: &str) -> Vec<Sample> {
|
||||
let tag = get_tag(conn, tag).expect("Expected tag to exist...");
|
||||
|
||||
let sample_ids = SampleTag::belonging_to(&tag).select(schema::samples_tags::sample_id);
|
||||
|
|
Loading…
Reference in a new issue