fedora-iot / dbus-parsec

DBus PARSEC interface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build failure with dbus crate

nullr0ute opened this issue · comments

I'm seeing the following error when trying to build this on Fedora 37

   Compiling parsec-client v0.14.0
warning: unused import: `dbus::arg`
 --> /builddir/build/BUILD/dbus-parsec-0.3.1/target/release/build/dbus-parsec-361de4b5cf7b1530/out/dbus_parsec_control_client.rs:3:5
  |
3 | use dbus::arg;
  |     ^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default
warning: unused import: `parsec_client::core::secrecy::Secret`
  --> src/daemon.rs:23:5
   |
23 | use parsec_client::core::secrecy::Secret;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default
warning: unused import: `dbus::arg`
 --> /builddir/build/BUILD/dbus-parsec-0.3.1/target/release/build/dbus-parsec-361de4b5cf7b1530/out/dbus_parsec_control_server.rs:3:5
  |
3 | use dbus::arg;
  |     ^^^^^^^^^
warning: unused import: `dbus::arg`
 --> /builddir/build/BUILD/dbus-parsec-0.3.1/target/release/build/dbus-parsec-361de4b5cf7b1530/out/dbus_parsec_control_client.rs:3:5
  |
3 | use dbus::arg;
  |     ^^^^^^^^^
error[E0308]: mismatched types
  --> src/agent/control.rs:38:56
   |
38 |         match self.parsec_client.psa_export_public_key(key_name.clone()) {
   |                                                        ^^^^^^^^^^^^^^^^
   |                                                        |
   |                                                        expected `&str`, found struct `std::string::String`
   |                                                        help: consider borrowing here: `&key_name`
error[E0308]: mismatched types
  --> src/agent/control.rs:48:48
   |
48 |                         .psa_export_public_key(key_name.clone())
   |                                                ^^^^^^^^^^^^^^^^
   |                                                |
   |                                                expected `&str`, found struct `std::string::String`
   |                                                help: consider borrowing here: `&key_name`
error[E0308]: mismatched types
   --> src/agent/mod.rs:162:31
    |
162 |             .psa_generate_key(key_name.to_string(), key_attrs)?;
    |                               ^^^^^^^^^^^^^^^^^^^^
    |                               |
    |                               expected `&str`, found struct `std::string::String`
    |                               help: consider borrowing here: `&key_name.to_string()`
error[E0308]: mismatched types
   --> src/agent/mod.rs:211:41
    |
211 |                 .psa_asymmetric_decrypt(key_name, asym_enc_algo, wrapkey, None)
    |                                         ^^^^^^^^
    |                                         |
    |                                         expected `&str`, found struct `std::string::String`
    |                                         help: consider borrowing here: `&key_name`
For more information about this error, try `rustc --explain E0308`.
warning: `dbus-parsec` (bin "dbus-parsec") generated 3 warnings
error: could not compile `dbus-parsec` due to 4 previous errors; 3 warnings emitted
warning: build failed, waiting for other jobs to finish...
warning: `dbus-parsec` (bin "dbus-parsec-control") generated 1 warning
error: build failed

Does this needs fixing?
I can push a PR