Skip to content

Commit

Permalink
remove konachan
Browse files Browse the repository at this point in the history
  • Loading branch information
cijiugechu committed Mar 7, 2024
1 parent 429c310 commit 34413b5
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 376 deletions.
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 30,3 @@ tracing-subscriber = "0.3"

[[example]]
name = "get_popular"

[[example]]
name = "konachan"
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 9,6 @@ The client currently supports:
- [x] Gelbooru
- [x] Safebooru
- [x] Danbooru
- [x] Konachan
- [x] Rule 34

## Example
Expand Down
14 changes: 0 additions & 14 deletions examples/konachan.rs

This file was deleted.

11 changes: 2 additions & 9 deletions src/client/generic.rs
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
use crate::model::{
danbooru::DanbooruRating, gelbooru::GelbooruRating, konachan::KonachanRating,
rule34::Rule34Rating, safebooru::SafebooruRating,
danbooru::DanbooruRating, gelbooru::GelbooruRating, rule34::Rule34Rating,
safebooru::SafebooruRating,
};
use serde::{Deserialize, Serialize};
use std::fmt;
Expand All @@ -9,7 9,6 @@ pub enum Rating {
Danbooru(DanbooruRating),
Gelbooru(GelbooruRating),
Safebooru(SafebooruRating),
Konachan(KonachanRating),
Rule34(Rule34Rating),
}

Expand All @@ -31,12 30,6 @@ impl From<SafebooruRating> for Rating {
}
}

impl From<KonachanRating> for Rating {
fn from(value: KonachanRating) -> Self {
Rating::Konachan(value)
}
}

impl From<Rule34Rating> for Rating {
fn from(value: Rule34Rating) -> Self {
Rating::Rule34(value)
Expand Down
122 changes: 0 additions & 122 deletions src/client/konachan.rs

This file was deleted.

11 changes: 0 additions & 11 deletions src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 6,13 @@ use self::{
danbooru::DanbooruClient,
gelbooru::GelbooruClient,
generic::{AutoCompleteItem, Rating, Sort},
konachan::KonachanClient,
rule34::Rule34Client,
safebooru::SafebooruClient,
};

pub mod danbooru;
pub mod gelbooru;
pub mod generic;
pub mod konachan;
pub mod rule34;
pub mod safebooru;

Expand Down Expand Up @@ -124,15 122,6 @@ impl<T: Client Any> ClientBuilder<T> {
);
format!("rating:{}", rating)
}
Rating::Konachan(rating) => {
assert_eq!(
TypeId::of::<T>(),
TypeId::of::<KonachanClient>(),
"{:?} `ClientBuilder` but tried to apply a Konachan rating to it.",
TypeId::of::<T>(),
);
format!("rating:{}", rating)
}
Rating::Rule34(rating) => {
assert_eq!(
TypeId::of::<T>(),
Expand Down
5 changes: 0 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 67,6 @@ pub mod danbooru {
pub use crate::model::danbooru::*;
}

pub mod konachan {
pub use crate::client::konachan::*;
pub use crate::model::konachan::*;
}

pub mod rule34 {
pub use crate::client::rule34::*;
pub use crate::model::rule34::*;
Expand Down
61 changes: 0 additions & 61 deletions src/model/konachan.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/model/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 1,4 @@
pub mod danbooru;
pub mod gelbooru;
pub mod konachan;
pub mod rule34;
pub mod safebooru;
Loading

0 comments on commit 34413b5

Please sign in to comment.