Giter Site home page Giter Site logo

mailfred's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mailfred's Issues

Build fails using version 0.1.0

I receive many compile errors when trying to use the library (I followed the steps in the README), below the output:

$ cargo build
   Compiling mailfred v0.1.0
error[E0282]: type annotations needed
  --> /home/miguel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mailfred-0.1.0/src/transports/imap.rs:42:87
   |
42 |             let client = ClientBuilder::new(&self.domain, self.port).connect(|domain, tcp| {
   |                                                                                       ^^^
43 |                 tcp_stream = Some(tcp.try_clone()?);
   |                                   --- type must be known at this point
   |
help: consider giving this closure parameter an explicit type
   |
42 |             let client = ClientBuilder::new(&self.domain, self.port).connect(|domain, tcp: /* Type */| {
   |                                                                                          ++++++++++++

error[E0061]: this method takes 0 arguments but 1 argument was supplied
   --> /home/miguel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mailfred-0.1.0/src/transports/imap.rs:42:70
    |
42  |               let client = ClientBuilder::new(&self.domain, self.port).connect(|domain, tcp| {
    |  ______________________________________________________________________^^^^^^^_-
43  | |                 tcp_stream = Some(tcp.try_clone()?);
44  | |                 let ssl_conn = TlsConnector::builder().build()?;
45  | |                 Ok(TlsConnector::connect(&ssl_conn, domain, tcp)?)
46  | |             })?;
    | |             -
    | |             |
    | |_____________unexpected argument
    |               help: remove the extra argument
    |
note: method defined here
   --> /home/miguel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/imap-3.0.0-alpha.12/src/client_builder.rs:218:12
    |
218 |     pub fn connect(&self) -> Result<Client<Connection>> {
    |            ^^^^^^^

error[E0599]: no method named `native_tls` found for struct `ClientBuilder` in the current scope
   --> /home/miguel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mailfred-0.1.0/src/transports/imap.rs:159:72
    |
159 |         let client = imap::ClientBuilder::new(&self.domain, self.port).native_tls()?;
    |                                                                        ^^^^^^^^^^ method not found in `ClientBuilder<&String>`

error[E0308]: mismatched types
  --> /home/miguel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mailfred-0.1.0/src/transports/smtp.rs:34:13
   |
34 |             client,
   |             ^^^^^^ expected `TlsStream<TcpStream>`, found a different `TlsStream<TcpStream>`
   |
   = note: `TlsStream<TcpStream>` and `TlsStream<TcpStream>` have similar names, but are actually distinct types
note: `TlsStream<TcpStream>` is defined in crate `tokio_rustls`
  --> /home/miguel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-rustls-0.25.0/src/client.rs:17:1
   |
17 | pub struct TlsStream<IO> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^
note: `TlsStream<TcpStream>` is defined in crate `tokio_rustls`
  --> /home/miguel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-rustls-0.24.1/src/client.rs:11:1
   |
11 | pub struct TlsStream<IO> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^
   = note: perhaps two different versions of crate `tokio_rustls` are being used?

Some errors have detailed explanations: E0061, E0282, E0308, E0599.
For more information about an error, try `rustc --explain E0061`.
error: could not compile `mailfred` (lib) due to 4 previous errors

Rust version:

$ rustc --version
rustc 1.75.0 (82e1608df 2023-12-21)

Any help would be appreciated

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.