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:
@@ -44,7 +44,7 @@ pub struct CrossEntropyLoss {
|
||||
|
||||
impl CrossEntropyLoss {
|
||||
/// Create a new cross-entropy loss with default configuration
|
||||
#[must_use]
|
||||
#[must_use]
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
config: CrossEntropyConfig::default(),
|
||||
@@ -52,13 +52,13 @@ impl CrossEntropyLoss {
|
||||
}
|
||||
|
||||
/// Create a new cross-entropy loss with custom configuration
|
||||
#[must_use]
|
||||
#[must_use]
|
||||
pub fn with_config(config: CrossEntropyConfig) -> Self {
|
||||
Self { config }
|
||||
}
|
||||
|
||||
/// Get the configuration
|
||||
#[must_use]
|
||||
#[must_use]
|
||||
pub fn config(&self) -> &CrossEntropyConfig {
|
||||
&self.config
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user