mirror of
				https://github.com/0glabs/0g-storage-node.git
				synced 2025-11-04 00:27:39 +00:00 
			
		
		
		
	fix: incorrect functions and code comments (#328)
* hashset_delay.rs * Update lib.rs
This commit is contained in:
		
							parent
							
								
									b156519e40
								
							
						
					
					
						commit
						d581ad7ba5
					
				@ -61,7 +61,7 @@ where
 | 
				
			|||||||
        self.insert_at(key, self.default_entry_timeout);
 | 
					        self.insert_at(key, self.default_entry_timeout);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /// Inserts an entry that will expire at a given instant. If the entry already exists, the
 | 
					    /// Inserts an entry that will expire at a given duration. If the entry already exists, the
 | 
				
			||||||
    /// timeout is updated.
 | 
					    /// timeout is updated.
 | 
				
			||||||
    pub fn insert_at(&mut self, key: K, entry_duration: Duration) {
 | 
					    pub fn insert_at(&mut self, key: K, entry_duration: Duration) {
 | 
				
			||||||
        if self.contains(&key) {
 | 
					        if self.contains(&key) {
 | 
				
			||||||
 | 
				
			|||||||
@ -78,7 +78,7 @@ pub fn try_create_int_counter(name: &str, help: &str) -> Result<IntCounter> {
 | 
				
			|||||||
    Ok(counter)
 | 
					    Ok(counter)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// Attempts to create an `IntGauge`, returning `Err` if the registry does not accept the counter
 | 
					/// Attempts to create an `IntGauge`, returning `Err` if the registry does not accept the gauge
 | 
				
			||||||
/// (potentially due to naming conflict).
 | 
					/// (potentially due to naming conflict).
 | 
				
			||||||
pub fn try_create_int_gauge(name: &str, help: &str) -> Result<IntGauge> {
 | 
					pub fn try_create_int_gauge(name: &str, help: &str) -> Result<IntGauge> {
 | 
				
			||||||
    let opts = Opts::new(name, help);
 | 
					    let opts = Opts::new(name, help);
 | 
				
			||||||
@ -87,7 +87,7 @@ pub fn try_create_int_gauge(name: &str, help: &str) -> Result<IntGauge> {
 | 
				
			|||||||
    Ok(gauge)
 | 
					    Ok(gauge)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// Attempts to create a `Gauge`, returning `Err` if the registry does not accept the counter
 | 
					/// Attempts to create a `Gauge`, returning `Err` if the registry does not accept the gauge
 | 
				
			||||||
/// (potentially due to naming conflict).
 | 
					/// (potentially due to naming conflict).
 | 
				
			||||||
pub fn try_create_float_gauge(name: &str, help: &str) -> Result<Gauge> {
 | 
					pub fn try_create_float_gauge(name: &str, help: &str) -> Result<Gauge> {
 | 
				
			||||||
    let opts = Opts::new(name, help);
 | 
					    let opts = Opts::new(name, help);
 | 
				
			||||||
@ -96,7 +96,7 @@ pub fn try_create_float_gauge(name: &str, help: &str) -> Result<Gauge> {
 | 
				
			|||||||
    Ok(gauge)
 | 
					    Ok(gauge)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// Attempts to create a `Histogram`, returning `Err` if the registry does not accept the counter
 | 
					/// Attempts to create a `Histogram`, returning `Err` if the registry does not accept the histogram
 | 
				
			||||||
/// (potentially due to naming conflict).
 | 
					/// (potentially due to naming conflict).
 | 
				
			||||||
pub fn try_create_histogram(name: &str, help: &str) -> Result<Histogram> {
 | 
					pub fn try_create_histogram(name: &str, help: &str) -> Result<Histogram> {
 | 
				
			||||||
    let opts = HistogramOpts::new(name, help);
 | 
					    let opts = HistogramOpts::new(name, help);
 | 
				
			||||||
@ -105,7 +105,7 @@ pub fn try_create_histogram(name: &str, help: &str) -> Result<Histogram> {
 | 
				
			|||||||
    Ok(histogram)
 | 
					    Ok(histogram)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// Attempts to create a `HistogramVec`, returning `Err` if the registry does not accept the counter
 | 
					/// Attempts to create a `HistogramVec`, returning `Err` if the registry does not accept the histogram
 | 
				
			||||||
/// (potentially due to naming conflict).
 | 
					/// (potentially due to naming conflict).
 | 
				
			||||||
pub fn try_create_histogram_vec(
 | 
					pub fn try_create_histogram_vec(
 | 
				
			||||||
    name: &str,
 | 
					    name: &str,
 | 
				
			||||||
@ -144,7 +144,7 @@ pub fn try_create_float_gauge_vec(
 | 
				
			|||||||
    Ok(counter_vec)
 | 
					    Ok(counter_vec)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/// Attempts to create a `IntCounterVec`, returning `Err` if the registry does not accept the gauge
 | 
					/// Attempts to create a `IntCounterVec`, returning `Err` if the registry does not accept the counter
 | 
				
			||||||
/// (potentially due to naming conflict).
 | 
					/// (potentially due to naming conflict).
 | 
				
			||||||
pub fn try_create_int_counter_vec(
 | 
					pub fn try_create_int_counter_vec(
 | 
				
			||||||
    name: &str,
 | 
					    name: &str,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user