the Assistant* is inserting weird HTML escaping sequences in Rust documentation comments, see an example here:
/// Calculates the factorial of a non-negative integer.
///
/// The factorial of a number is the product of all positive integers less than or equal to it.
/// For example, the factorial of 5 (denoted as 5!) equals 5 × 4 × 3 × 2 × 1 = 120.
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// // First, let's implement our factorial function
/// fn factorial(n: u64) -> u64 {
/// if n == 0 || n == 1 {
/// 1
/// } else {
/// let mut result = 1;
/// for i in 2..=n {
/// result *= i;
/// }
/// result
/// }
/// }
///
/// // Now we can use it
/// assert_eq!(factorial(0), 1);
/// assert_eq!(factorial(1), 1);
/// assert_eq!(factorial(5), 120);
/// ```
///
/// # Panics
///
/// This function will panic if the input is negative.
pub fn factorial(n: u64) -> u64 {
if n == 0 || n == 1 {
1
} else {
let mut result = 1;
for i in 2..=n {
result *= i;
}
result
}
}
As you can see, this only happens in the comments, the code is fine.
*I guess not really the assistant but the output formatting
.