Skip to content

Commit

Permalink
clean up dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
pd0wm committed Mar 27, 2024
1 parent 7833a82 commit 7e86b0e
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 17 deletions.
2 changes: 0 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@ serde = ["dep:serde"]
[dependencies]
async-stream = "^0.3.5"
bstr = "^1.9.0"
futures = "^0.3.30"
futures-core = "^0.3.30"
futures-util = "^0.3.30"
hex = "^0.4"
rusb = "^0.9"
serde = {version = "^1.0.197", features = ["derive"], optional = true}
serial_test = "^3.0.0"
strum = "^0.26"
strum_macros = "^0.26"
thiserror = "^1.0.58"
tokio = {version = "^1.36.0", features=["full"]}
tokio-stream = "^0.1.14"
tracing = "^0.1"
tracing-subscriber = "^0.3"

[target.'cfg(target_os = "linux")'.dependencies]
# socketcan = {path = "../socketcan-rs"}
# socketcan = "^3.3.0"
socketcan = {git = "https://github.com/socketcan-rs/socketcan-rs.git", rev = "3ebef4e3f54bc21e3d993d40fa160ebb7f3047b0" }

[dev-dependencies]
futures = "^0.3.30"
tracing-subscriber = "^0.3"
serial_test = "^3.0.0"
2 changes: 1 addition & 1 deletion examples/can_printer.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use futures_util::stream::StreamExt;
use automotive::StreamExt;
use tracing_subscriber;

#[tokio::main]
Expand Down
2 changes: 1 addition & 1 deletion examples/isotp.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use automotive::can::Identifier;
use automotive::isotp::{IsoTPAdapter, IsoTPConfig};
use futures_util::stream::StreamExt;
use automotive::StreamExt;
use tracing_subscriber;

#[tokio::main]
Expand Down
2 changes: 1 addition & 1 deletion src/can/async_can.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use std::collections::{HashMap, VecDeque};
use crate::can::CanAdapter;
use crate::can::Frame;
use crate::can::Identifier;
use crate::Stream;
use async_stream::stream;
use futures_core::stream::Stream;
use tokio::sync::{broadcast, mpsc, oneshot};
use tracing::debug;

Expand Down
5 changes: 2 additions & 3 deletions src/isotp/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! ISO Transport Protocol (ISO-TP) implementation, implements ISO 15765-2
//! ## Example:
//! ```rust
//! use futures_util::stream::StreamExt;
//! use automotive::StreamExt;
//! async fn isotp_example() {
//! let adapter = automotive::can::get_adapter().unwrap();
//! let config = automotive::isotp::IsoTPConfig::new(0, automotive::can::Identifier::Standard(0x7a1));
Expand All @@ -23,9 +23,8 @@ pub use error::Error;
use crate::can::AsyncCanAdapter;
use crate::can::{Frame, Identifier, DLC_TO_LEN};
use crate::Result;
use crate::{Stream, StreamExt, Timeout};
use async_stream::stream;
use futures_core::stream::Stream;
use tokio_stream::{StreamExt, Timeout};
use tracing::debug;

use self::types::FlowControlConfig;
Expand Down
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//! The following adapter opens the first available adapter on the system, and then receives all frames.
//!
//! ```rust
//! use futures_util::stream::StreamExt;
//! use automotive::StreamExt;
//! async fn can_example() {
//! let adapter = automotive::can::get_adapter().unwrap();
//! let mut stream = adapter.recv();
Expand Down Expand Up @@ -46,6 +46,9 @@ pub mod isotp;
pub mod panda;
pub mod uds;

/// Re-export of relevant stream traits from `tokio_stream`.
pub use tokio_stream::{Stream, StreamExt, Timeout};

pub use error::Error;
pub type Result<T> = std::result::Result<T, Error>;

Expand Down
2 changes: 1 addition & 1 deletion src/uds/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ mod types;

use crate::isotp::IsoTPAdapter;
use crate::Result;
use crate::StreamExt;
pub use constants::*;
pub use error::{Error, NegativeResponseCode};

use tokio_stream::StreamExt;
use tracing::info;

/// UDS Client. Wraps an IsoTPAdapter to provide a simple interface for making UDS calls.
Expand Down
2 changes: 1 addition & 1 deletion tests/isotp_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
use automotive::can::AsyncCanAdapter;
use automotive::can::Identifier;
use automotive::isotp::{IsoTPAdapter, IsoTPConfig};
use automotive::StreamExt;
use std::process::{Child, Command};
use tokio_stream::StreamExt;

static VECU_STARTUP_TIMEOUT_MS: u64 = 10000;

Expand Down
2 changes: 1 addition & 1 deletion tests/uds_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use automotive::isotp::{IsoTPAdapter, IsoTPConfig};
use automotive::uds::Error as UDSError;
use automotive::uds::NegativeResponseCode;
use automotive::uds::UDSClient;
use automotive::StreamExt;
use std::process::{Child, Command};
use tokio_stream::StreamExt;

static VECU_STARTUP_TIMEOUT_MS: u64 = 10000;

Expand Down

0 comments on commit 7e86b0e

Please sign in to comment.