From 3d11f1382ec675f5c8b76ced64c9ba8defc3de2b Mon Sep 17 00:00:00 2001 From: doryan Date: Sun, 10 Aug 2025 21:22:25 +0400 Subject: [PATCH] fix: import ring buffer after fix Cargo.toml of ring-buffer crate --- Cargo.toml | 2 +- src/lib.rs | 2 -- src/structures/ring_buffer.rs | 1 + 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d537cea..f2af0a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,8 +15,8 @@ rev = "3e362624547462928a219c40f9ea8e3a64f21e5f" git = "https://gitea.doryan04.ru/TheEmbeddedRust/static-pins" [features] -ring-buf = ["ring-buffer"] sparkfun-promicro = ["arduino-hal/sparkfun-promicro", "static-pins/sparkfun-promicro"] +ring-buf = ["ring-buffer"] [dependencies.avr-device] version = "0.5.4" diff --git a/src/lib.rs b/src/lib.rs index 1c7d8b9..d96d55e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,8 +16,6 @@ use static_pins::StaticPinOps; mod structures; -pub use structures::ring_buffer::*; - pub type PollResult = Result<(), PollError>; pub type ReadByteResult = Result; pub type CorruptedData = (u8, u8); diff --git a/src/structures/ring_buffer.rs b/src/structures/ring_buffer.rs index eb1d0ff..72b9c6f 100644 --- a/src/structures/ring_buffer.rs +++ b/src/structures/ring_buffer.rs @@ -2,6 +2,7 @@ // Youtube: https://www.youtube.com/watch?v=uIJnATS9j_0 use arduino_hal::port::PinOps; +use ring_buffer::RingBuffer; use static_pins::StaticPinOps; use crate::{