mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-01 22:01:49 +00:00
clippy
This commit is contained in:
parent
d106144ac6
commit
525cb710b1
1 changed files with 4 additions and 3 deletions
|
@ -417,6 +417,7 @@ impl<'a> CommentQuery<'a> {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
#[allow(clippy::indexing_slicing)]
|
#[allow(clippy::indexing_slicing)]
|
||||||
|
#[allow(clippy::unwrap_used)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
@ -461,7 +462,7 @@ mod tests {
|
||||||
CommunityVisibility,
|
CommunityVisibility,
|
||||||
SubscribedType,
|
SubscribedType,
|
||||||
};
|
};
|
||||||
use lemmy_utils::{error::LemmyResult, LemmyErrorType};
|
use lemmy_utils::error::LemmyResult;
|
||||||
use pretty_assertions::assert_eq;
|
use pretty_assertions::assert_eq;
|
||||||
use serial_test::serial;
|
use serial_test::serial;
|
||||||
|
|
||||||
|
@ -556,7 +557,7 @@ mod tests {
|
||||||
|
|
||||||
let polish_id = Language::read_id_from_code(pool, Some("pl"))
|
let polish_id = Language::read_id_from_code(pool, Some("pl"))
|
||||||
.await?
|
.await?
|
||||||
.ok_or(LemmyErrorType::LanguageNotAllowed)?;
|
.unwrap();
|
||||||
let comment_form_4 = CommentInsertForm::builder()
|
let comment_form_4 = CommentInsertForm::builder()
|
||||||
.content("Comment 4".into())
|
.content("Comment 4".into())
|
||||||
.creator_id(inserted_timmy_person.id)
|
.creator_id(inserted_timmy_person.id)
|
||||||
|
@ -817,7 +818,7 @@ mod tests {
|
||||||
// change user lang to finnish, should only show one post in finnish and one undetermined
|
// change user lang to finnish, should only show one post in finnish and one undetermined
|
||||||
let finnish_id = Language::read_id_from_code(pool, Some("fi"))
|
let finnish_id = Language::read_id_from_code(pool, Some("fi"))
|
||||||
.await?
|
.await?
|
||||||
.ok_or(LemmyErrorType::LanguageNotAllowed)?;
|
.unwrap();
|
||||||
LocalUserLanguage::update(
|
LocalUserLanguage::update(
|
||||||
pool,
|
pool,
|
||||||
vec![finnish_id],
|
vec![finnish_id],
|
||||||
|
|
Loading…
Reference in a new issue