docx_rs/documents/header_id.rs
1/*
2use std::sync::atomic::AtomicUsize;
3#[cfg(not(test))]
4static HEADER_ID: AtomicUsize = AtomicUsize::new(1);
5
6#[cfg(not(test))]
7pub fn generate_header_id() -> usize {
8 use std::sync::atomic::Ordering;
9
10 let id = HEADER_ID.load(Ordering::Relaxed);
11 HEADER_ID.store(id.wrapping_add(1), Ordering::Relaxed);
12 id
13}
14
15#[cfg(test)]
16pub fn generate_header_id() -> usize {
17 123
18}
19*/
20pub fn create_header_rid(id: usize) -> String {
21 format!("rIdHeader{}", id)
22}