Create a new code learning with the minimum required fields.
(path: impl Into<String>, line: Option<u32>, finding: impl Into<String>)
| 185 | impl CodeLearning { |
| 186 | /// Create a new code learning with the minimum required fields. |
| 187 | pub fn new(path: impl Into<String>, line: Option<u32>, finding: impl Into<String>) -> Self { |
| 188 | Self { |
| 189 | path: path.into(), |
| 190 | line, |
| 191 | end_line: None, |
| 192 | function: None, |
| 193 | finding: finding.into(), |
| 194 | category: None, |
| 195 | _anchor: None, |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | /// Set the function name. |
| 200 | #[must_use] |
nothing calls this directly
no outgoing calls
no test coverage detected