style: apply rustfmt across all crates and demos
Consistent formatting pass: line wrapping, import sorting, trailing whitespace removal, let-chain indentation, merged derive attributes, and unsafe block reformatting. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
This commit is contained in:
@@ -89,7 +89,7 @@ pub struct BaseOptimizer {
|
||||
|
||||
impl BaseOptimizer {
|
||||
/// Create a new base optimizer
|
||||
#[must_use]
|
||||
#[must_use]
|
||||
pub fn new(learning_rate: f64) -> Self {
|
||||
Self {
|
||||
stored_gradients: HashMap::new(),
|
||||
@@ -98,7 +98,7 @@ impl BaseOptimizer {
|
||||
}
|
||||
|
||||
/// Get stored gradients
|
||||
#[must_use]
|
||||
#[must_use]
|
||||
pub fn stored_gradients(&self) -> &HashMap<String, Tensor> {
|
||||
&self.stored_gradients
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user