Skip to content

Commit

Permalink
chore: Update deprecation message on in-mem support loggin functions …
Browse files Browse the repository at this point in the history
…in pact_matching crate
  • Loading branch information
rholshausen committed Sep 5, 2024
1 parent f5228c5 commit effa4c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rust/pact_matching/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ lazy_static! {
/// Accumulates the log entries against a task local ID. If the ID is not set, accumulates against
/// the "global" ID.
/// cbindgen:ignore
#[deprecated(note = "This must be moved to the FFI crate")]
#[deprecated(note = "Do not use this, it has been moved to the FFI crate")]
static ref LOG_BUFFER: Mutex<HashMap<String, BytesMut>> = Mutex::new(HashMap::new());
}

Expand All @@ -29,7 +29,7 @@ task_local! {
}

/// Fetches the contents from the id scoped in-memory buffer and empties the buffer.
#[deprecated(note = "This must be moved to the FFI crate")]
#[deprecated(note = "Do not use this function, it has been moved to the FFI crate")]
pub fn fetch_buffer_contents(id: &str) -> Bytes {
let mut inner = LOG_BUFFER.lock().unwrap();
let buffer = inner.entry(id.to_string())
Expand All @@ -39,7 +39,7 @@ pub fn fetch_buffer_contents(id: &str) -> Bytes {

/// Writes the provided bytes to the task local ID scoped in-memory buffer. If there is no
/// task local ID set, will write to the "global" buffer.
#[deprecated(note = "This must be moved to the FFI crate")]
#[deprecated(note = "Do not use this function, it has been moved to the FFI crate")]
pub fn write_to_log_buffer(buf: &[u8]) {
let id = LOG_ID.try_with(|id| id.clone()).unwrap_or_else(|_| "global".into());
let mut inner = LOG_BUFFER.lock().unwrap();
Expand Down

0 comments on commit effa4c7

Please sign in to comment.