mirror of
https://github.com/Nutomic/ibis.git
synced 2024-12-23 23:11:24 +00:00
clippy
This commit is contained in:
parent
d720a003e2
commit
53a89a51d3
4 changed files with 3 additions and 14 deletions
|
@ -116,12 +116,7 @@ pub(in crate::backend::api) async fn edit_article(
|
|||
edit_form.new_text.push('\n');
|
||||
}
|
||||
|
||||
dbg!(
|
||||
&edit_form.previous_version_id,
|
||||
&original_article.latest_version
|
||||
);
|
||||
if edit_form.previous_version_id == original_article.latest_version {
|
||||
dbg!("no conflict");
|
||||
// No intermediate changes, simply submit new version
|
||||
submit_article_update(
|
||||
edit_form.new_text.clone(),
|
||||
|
|
|
@ -15,6 +15,7 @@ use {
|
|||
},
|
||||
activitypub_federation::fetch::{collection_id::CollectionId, object_id::ObjectId},
|
||||
diesel::{Identifiable, Queryable, Selectable},
|
||||
diesel_derive_newtype::DieselNewType,
|
||||
};
|
||||
|
||||
pub const MAIN_PAGE_NAME: &str = "Main_Page";
|
||||
|
@ -149,10 +150,8 @@ pub struct DbLocalUser {
|
|||
pub person_id: i32,
|
||||
pub admin: bool,
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Debug, Copy, Clone, Hash, Eq, PartialEq, Default, Serialize, Deserialize, DieselNewType,
|
||||
)]
|
||||
#[derive(Debug, Copy, Clone, Hash, Eq, PartialEq, Default, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "ssr", derive(DieselNewType))]
|
||||
pub struct PersonId(pub i32);
|
||||
|
||||
/// Federation related data from a local or remote user.
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
#[macro_use]
|
||||
extern crate diesel_derive_newtype;
|
||||
|
||||
#[cfg(feature = "ssr")]
|
||||
pub mod backend;
|
||||
pub mod common;
|
||||
|
|
|
@ -358,7 +358,6 @@ async fn test_local_edit_conflict() -> MyResult<()> {
|
|||
previous_version_id: create_res.latest_version.clone(),
|
||||
resolve_conflict_id: None,
|
||||
};
|
||||
dbg!("first edit");
|
||||
let edit_res = data.alpha.edit_article(&edit_form).await?;
|
||||
assert_eq!(edit_res.article.text, edit_form.new_text);
|
||||
assert_eq!(2, edit_res.edits.len());
|
||||
|
@ -371,7 +370,6 @@ async fn test_local_edit_conflict() -> MyResult<()> {
|
|||
previous_version_id: create_res.latest_version,
|
||||
resolve_conflict_id: None,
|
||||
};
|
||||
dbg!("second edit");
|
||||
let edit_res = data
|
||||
.alpha
|
||||
.edit_article_with_conflict(&edit_form)
|
||||
|
|
Loading…
Reference in a new issue