Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance optimizations #3378

Closed

Update lib.rs

409e3fb
Select commit
Loading
Failed to load commit list.
Closed

Performance optimizations #3378

Update lib.rs
409e3fb
Select commit
Loading
Failed to load commit list.
Garnix CI / package drip [x86_64-linux] failed Dec 14, 2024 in 7m 13s

Run results

Build failed

Details

Last 100 lines of logs:

  |
5 | use async_sqlite::{rusqlite::params, JournalMode, Pool, PoolBuilder};
  |                    ^^^^^^^^^^^^^^^^

warning: unused imports: `NaiveDateTime` and `Utc`
 --> drip/src/main.rs:7:14
  |
7 | use chrono::{NaiveDateTime, Utc};
  |              ^^^^^^^^^^^^^  ^^^

warning: unused imports: `error` and `warn`
  --> drip/src/main.rs:11:22
   |
11 | use tracing::{debug, error, info, warn};
   |                      ^^^^^        ^^^^

error[E0277]: the trait bound `Mutation: async_graphql::ObjectType` is not satisfied
  --> drip/src/main.rs:31:57
   |
31 |     let router = Router::new().route("/", get(graphiql).post_service(GraphQL::new(schema)));
   |                                                         ^^^^^^^^^^^^ the trait `async_graphql::ObjectType` is not implemented for `Mutation`, which is required by `GraphQL<async_graphql::Schema<Query, Mutation, async_graphql::EmptySubscription>>: hyper::service::Service<axum::http::Request<Body>>`
   |
   = help: the following other types implement trait `async_graphql::ObjectType`:
             &T
             Arc<T>
             Box<T>
             Edge<Cursor, Node, EdgeFields, Name>
             EmptyFields
             EmptyMutation
             MergedObjectTail
             PageInfo
           and 9 others
   = note: required for `async_graphql::Schema<Query, Mutation, async_graphql::EmptySubscription>` to implement `async_graphql::Executor`
   = note: required for `GraphQL<async_graphql::Schema<Query, Mutation, async_graphql::EmptySubscription>>` to implement `hyper::service::Service<axum::http::Request<Body>>`

error[E0277]: the trait bound `Config: impl_serde::serde::Deserialize<'_>` is not satisfied
    --> drip/src/main.rs:47:5
     |
47   |     serde_json::from_str(&content).map_err(|e| format!("Invalid config format: {}", e))
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `impl_serde::serde::Deserialize<'_>` is not implemented for `Config`
     |
     = help: the following other types implement trait `impl_serde::serde::Deserialize<'de>`:
               &'a [u8]
               &'a serde_bytes::ByteArray<N>
               &'a serde_bytes::Bytes
               &'a serde_json::value::RawValue
               &'a std::path::Path
               &'a str
               ()
               (T,)
             and 1467 others
note: required by a bound in `serde_json::from_str`
    --> /nix/store/g1ahydy3sxcw1nni1hlqvvdkvcp1xf18-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/serde_json-1.0.118/src/de.rs:2676:8
     |
2674 | pub fn from_str<'a, T>(s: &'a str) -> Result<T>
     |        -------- required by a bound in this function
2675 | where
2676 |     T: de::Deserialize<'a>,
     |        ^^^^^^^^^^^^^^^^^^^ required by this bound in `from_str`

error[E0277]: the trait bound `Mutation: async_graphql::ObjectType` is not satisfied
   --> drip/src/main.rs:95:9
    |
93  |       Schema::build(
    |       ------------- required by a bound introduced by this call
94  |           Query,
95  | /         Mutation {
96  | |             ratelimit_seconds: config.ratelimit_seconds,
97  | |         },
    | |_________^ the trait `async_graphql::ObjectType` is not implemented for `Mutation`
    |
    = help: the following other types implement trait `async_graphql::ObjectType`:
              &T
              Arc<T>
              Box<T>
              Edge<Cursor, Node, EdgeFields, Name>
              EmptyFields
              EmptyMutation
              MergedObjectTail
              PageInfo
            and 9 others
note: required by a bound in `async_graphql::Schema::<Query, Mutation, Subscription>::build`
   --> /nix/store/g1ahydy3sxcw1nni1hlqvvdkvcp1xf18-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/async-graphql-7.0.7/src/schema.rs:341:15
    |
341 |     Mutation: ObjectType + 'static,
    |               ^^^^^^^^^^ required by this bound in `Schema::<Query, Mutation, Subscription>::build`
...
349 |     pub fn build(
    |            ----- required by a bound in this associated function

error[E0425]: cannot find function, tuple struct or tuple variant `MaxRequestPolls` in this scope
   --> drip/src/main.rs:101:11
    |
101 |     .data(MaxRequestPolls(config.max_request_polls))
    |           ^^^^^^^^^^^^^^^ not found in this scope

Some errors have detailed explanations: E0277, E0425, E0433.
For more information about an error, try `rustc --explain E0277`.
warning: `drip` (bin "drip") generated 4 warnings
error: could not compile `drip` (bin "drip") due to 10 previous errors; 4 warnings emitted