Skip to content

Internal error: left behind trailing whitespace #4248

@mkpankov

Description

@mkpankov
error[internal]: left behind trailing whitespace
   --> /home/mkpankov/work/integrated-manager-for-lustre/iml-services/iml-device/src/virtual_device/mod.rs:133:133:61
    |
133 |                                 guid2.map(|g| if g == guid1 { 
    |                                                              ^
    |

warning: rustfmt has failed to format. See previous 1 errors.

Happens around this code:

    if is_virtual(d) {
        if !commands.is_empty() {
            tracing::info!("Looking through commands");
            for c in commands {
                match c {
                    Command::PoolCommand(pc) => {
                        tracing::info!("Got PoolCommand");
                        match pc {
                            PoolCommand::UpdatePool(p) => {
                                tracing::info!("Got UpdatePool");

                                let guid1 = p.guid;
                                let guid2 = match d {
                                    Device::Zpool(dd) => Some(dd.guid),
                                    _ => None,
                                };
                                guid2.map(|g| if g == guid1 { 
                                results.push(parent.expect("Tried to push to parents the parent of the Root, which doesn't exist"))
                            });
                            }
                            _ => {}
                        }
                    }
                    _ => {}
                }
            }
            results
        } else {
            tracing::debug!(
                "Collecting parent {} of {}",
                parent.map(|x| to_display(x)).unwrap_or("None".into()),
                to_display(d)
            );
            vec![parent
                .expect("Tried to push to parents the parent of the Root, which doesn't exist")]
        }
    } else {

Full repository:
https://github.com/whamcloud/integrated-manager-for-lustre/tree/formatting

cd iml-services/iml-device && cargo fmt

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions