prefmt
This commit is contained in:
parent
6effd4f1a8
commit
e941cf8bc8
5 changed files with 22 additions and 100 deletions
|
@ -40,7 +40,8 @@ impl<T: Obd2BaseDevice> Obd2Device for Obd2<T> {
|
|||
}
|
||||
|
||||
impl<T: Obd2BaseDevice> Obd2<T> {
|
||||
pub fn new(dev: T) -> ::anyhow::Result<Self> {
|
||||
/// Creates a new instance of an Obd device
|
||||
pub fn new(dev: T) -> Result<Self> {
|
||||
let device = Obd2 {
|
||||
device: dev
|
||||
};
|
||||
|
@ -48,6 +49,7 @@ impl<T: Obd2BaseDevice> Obd2<T> {
|
|||
Ok(device)
|
||||
}
|
||||
|
||||
/// Resets the device
|
||||
pub fn reset(&mut self) -> Result<()> {
|
||||
Ok(self.device.reset()?)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue