You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: apply_transform.rs
    path of file: ./repos/svgcleaner/src/task/paths
    
    the code of the file until where you have to start completion: // svgcleaner could help you to clean up your SVG files
// from unnecessary data.
// Copyright (C) 2012-2018 Evgeniy Reizner
//
// This program is free software; you can redist
    
pub fn apply_transform(path: &mut Path, ts: &Transform) {
    let (sx, sy) = ts.get_scale();

    // Only proportional scale is supported.
    debug_assert!(sx.fuzzy_eq(&sy));

    for seg in &mut path.d {
        match *seg.data_mut() {
              SegmentData::MoveTo { ref mut x, ref mut y }
            | SegmentData::LineTo { ref mut x, ref mut y }
            | SegmentData::SmoothQuadratic { ref mut x, ref mut y } => {
                ts.apply_ref(x, y);
            }

            SegmentData::HorizontalLineTo { ref mut x } => {
                ts.apply_ref(x, &mut 0.0);
            }

            SegmentData::VerticalLineTo { ref mut y } => {
                ts.apply_ref(&mut 0.0, y);
            }

            SegmentData::CurveTo { ref mut x1, ref mut y1, ref mut x2, ref mut y2,
                                   ref mut x, ref mut y } => {
                ts.apply_ref(x1, y1);
                ts.apply_ref(x2, y2);
                ts.apply_ref(x,  y);
            }

            SegmentData::SmoothCurveTo { ref mut x2, ref mut y2, ref mut x, ref mut y } => {
                ts.apply_ref(x2, y2);
                ts.apply_ref(x,  y);
            }

            SegmentData::Quadratic { ref mut x1, ref mut y1, ref mut x, ref mut y } => {
                ts.apply_ref(x1, y1);
                ts.apply_ref(x,  y);
            }

            SegmentData::EllipticalArc { ref mut rx, ref mut ry, ref mut x, ref mut y, .. } => {
                *rx *= sx;
                *ry *= sx;

                ts.apply_ref(x,  y);
            }

            SegmentData::ClosePath => {}
        }
    }
}