fn merge(mut lesser: Self, mut greater: Self) -> Self {
        greater.build = match (lesser.build.take(), greater.build.take()) {
            (None, None) => None,
            (Some(val), None) | (None, Some(val)) => Some(val),
            (Some(l), Some(mut g)) => {
                g.target = g.target.or(l.target);
                g.dist = g.dist.or(l.dist);
                g.public_url = g.public_url.or(l.public_url);
                // NOTE: this can not be disabled in the cascade.
                if l.release {
                    g.release = true;
                }
                g.pattern_preload = g.pattern_preload.or(l.pattern_preload);
                g.pattern_script = g.pattern_script.or(l.pattern_script);
                g.pattern_params = g.pattern_params.or(l.pattern_params);
                Some(g)
            }
        };
        greater.watch = match (lesser.watch.take(), greater.watch.take()) {
            (None, None) => None,
            (Some(val), None) | (None, Some(val)) => Some(val),
            (Some(l), Some(mut g)) => {
                g.watch = g.watch.or(l.watch);
                g.ignore = g.ignore.or(l.ignore);
                Some(g)
            }
        };
        greater.serve = match (lesser.serve.take(), greater.serve.take()) {
            (None, None) => None,
            (Some(val), None) | (None, Some(val)) => Some(val),
            (Some(l), Some(mut g)) => {
                g.proxy_backend = g.proxy_backend.or(l.proxy_backend);
                g.proxy_rewrite = g.proxy_rewrite.or(l.proxy_rewrite);
                g.port = g.port.or(l.port);
                g.proxy_ws = g.proxy_ws || l.proxy_ws;
                // NOTE: this can not be disabled in the cascade.
                if l.no_autoreload {
                    g.no_autoreload = true;
                }
                // NOTE: this can not be disabled in the cascade.
                if l.open {
                    g.open = true;
                }
                Some(g)
            }
        };
        greater.tools = match (lesser.tools.take(), greater.tools.take()) {
            (None, None) => None,
            (Some(val), None) | (None, Some(val)) => Some(val),
            (Some(l), Some(mut g)) => {
                g.sass = g.sass.or(l.sass);
                g.wasm_bindgen = g.wasm_bindgen.or(l.wasm_bindgen);
                g.wasm_opt = g.wasm_opt.or(l.wasm_opt);
                Some(g)
            }
        };
        greater.clean = match (lesser.clean.take(), greater.clean.take()) {
            (None, None) => None,
            (Some(val), None) | (None, Some(val)) => Some(val),
            (Some(l), Some(mut g)) => {
                g.dist = g.dist.or(l.dist);
                // NOTE: this can not be disabled in the cascade.
                if l.cargo {
                    g.cargo = true;
                }
                Some(g)
            }
        };
        greater.proxy = match (lesser.proxy.take(), greater.proxy.take()) {
            (None, None) => None,
            (Some(val), None) | (None, Some(val)) => Some(val),
            (Some(_), Some(g)) => Some(g), // No meshing/merging. Only take the greater value.
        };
        greater.hooks = match (lesser.hooks.take(), greater.hooks.take()) {
            (None, None) => None,
            (Some(val), None) | (None, Some(val)) => Some(val),
            (Some(_), Some(g)) => Some(g), // No meshing/merging. Only take the greater value.
        };
        greater
    }
/// Merge the given layers, where the `greater` layer takes precedence.
Merge the given layers, where the `greater` layer takes precedence.
Merge the given layers where the ` greater ` layer takes precedence .
fn merge(mut lesser: Self, mut greater: Self) -> Self {
        greater.build = match (lesser.build.take(), greater.build.take()) {
            (None, None) => None,
            (Some(val), None) | (None, Some(val)) => Some(val),
            (Some(l), Some(mut g)) => {
                g.target = g.target.or(l.target);
                g.dist = g.dist.or(l.dist);
                g.public_url = g.public_url.or(l.public_url);
                // NOTE: this can not be disabled in the cascade.
                if l.release {
                    g.release = true;
                }
                g.pattern_preload = g.pattern_preload.or(l.pattern_preload);
                g.pattern_script = g.pattern_script.or(l.pattern_script);
                g.pattern_params = g.pattern_params.or(l.pattern_params);
                Some(g)
            }
        };
        greater.watch = match (lesser.watch.take(), greater.watch.take()) {
            (None, None) => None,
            (Some(val), None) | (None, Some(val)) => Some(val),
            (Some(l), Some(mut g)) => {
                g.watch = g.watch.or(l.watch);
                g.ignore = g.ignore.or(l.ignore);
                Some(g)
            }
        };
        greater.serve = match (lesser.serve.take(), greater.serve.take()) {
            (None, None) => None,
            (Some(val), None) | (None, Some(val)) => Some(val),
            (Some(l), Some(mut g)) => {
                g.proxy_backend = g.proxy_backend.or(l.proxy_backend);
                g.proxy_rewrite = g.proxy_rewrite.or(l.proxy_rewrite);
                g.port = g.port.or(l.port);
                g.proxy_ws = g.proxy_ws || l.proxy_ws;
                // NOTE: this can not be disabled in the cascade.
                if l.no_autoreload {
                    g.no_autoreload = true;
                }
                // NOTE: this can not be disabled in the cascade.
                if l.open {
                    g.open = true;
                }
                Some(g)
            }
        };
        greater.tools = match (lesser.tools.take(), greater.tools.take()) {
            (None, None) => None,
            (Some(val), None) | (None, Some(val)) => Some(val),
            (Some(l), Some(mut g)) => {
                g.sass = g.sass.or(l.sass);
                g.wasm_bindgen = g.wasm_bindgen.or(l.wasm_bindgen);
                g.wasm_opt = g.wasm_opt.or(l.wasm_opt);
                Some(g)
            }
        };
        greater.clean = match (lesser.clean.take(), greater.clean.take()) {
            (None, None) => None,
            (Some(val), None) | (None, Some(val)) => Some(val),
            (Some(l), Some(mut g)) => {
                g.dist = g.dist.or(l.dist);
                // NOTE: this can not be disabled in the cascade.
                if l.cargo {
                    g.cargo = true;
                }
                Some(g)
            }
        };
        greater.proxy = match (lesser.proxy.take(), greater.proxy.take()) {
            (None, None) => None,
            (Some(val), None) | (None, Some(val)) => Some(val),
            (Some(_), Some(g)) => Some(g), // No meshing/merging. Only take the greater value.
        };
        greater.hooks = match (lesser.hooks.take(), greater.hooks.take()) {
            (None, None) => None,
            (Some(val), None) | (None, Some(val)) => Some(val),
            (Some(_), Some(g)) => Some(g), // No meshing/merging. Only take the greater value.
        };
        greater
    }
fn merge ( mut lesser : Self , mut greater : Self ) -> Self { greater . build = match ( lesser . build . take ( ) , greater . build . take ( ) ) { ( None , None ) => None , ( Some ( val ) , None ) | ( None , Some ( val ) ) => Some ( val ) , ( Some ( l ) , Some ( mut g ) ) => { g . target = g . target . or ( l . target ) ; g . dist = g . dist . or ( l . dist ) ; g . public_url = g . public_url . or ( l . public_url ) ; // NOTE: this can not be disabled in the cascade. if l . release { g . release = true ; } g . pattern_preload = g . pattern_preload . or ( l . pattern_preload ) ; g . pattern_script = g . pattern_script . or ( l . pattern_script ) ; g . pattern_params = g . pattern_params . or ( l . pattern_params ) ; Some ( g ) } } ; greater . watch = match ( lesser . watch . take ( ) , greater . watch . take ( ) ) { ( None , None ) => None , ( Some ( val ) , None ) | ( None , Some ( val ) ) => Some ( val ) , ( Some ( l ) , Some ( mut g ) ) => { g . watch = g . watch . or ( l . watch ) ; g . ignore = g . ignore . or ( l . ignore ) ; Some ( g ) } } ; greater . serve = match ( lesser . serve . take ( ) , greater . serve . take ( ) ) { ( None , None ) => None , ( Some ( val ) , None ) | ( None , Some ( val ) ) => Some ( val ) , ( Some ( l ) , Some ( mut g ) ) => { g . proxy_backend = g . proxy_backend . or ( l . proxy_backend ) ; g . proxy_rewrite = g . proxy_rewrite . or ( l . proxy_rewrite ) ; g . port = g . port . or ( l . port ) ; g . proxy_ws = g . proxy_ws || l . proxy_ws ; // NOTE: this can not be disabled in the cascade. if l . no_autoreload { g . no_autoreload = true ; } // NOTE: this can not be disabled in the cascade. if l . open { g . open = true ; } Some ( g ) } } ; greater . tools = match ( lesser . tools . take ( ) , greater . tools . take ( ) ) { ( None , None ) => None , ( Some ( val ) , None ) | ( None , Some ( val ) ) => Some ( val ) , ( Some ( l ) , Some ( mut g ) ) => { g . sass = g . sass . or ( l . sass ) ; g . wasm_bindgen = g . wasm_bindgen . or ( l . wasm_bindgen ) ; g . wasm_opt = g . wasm_opt . or ( l . wasm_opt ) ; Some ( g ) } } ; greater . clean = match ( lesser . clean . take ( ) , greater . clean . take ( ) ) { ( None , None ) => None , ( Some ( val ) , None ) | ( None , Some ( val ) ) => Some ( val ) , ( Some ( l ) , Some ( mut g ) ) => { g . dist = g . dist . or ( l . dist ) ; // NOTE: this can not be disabled in the cascade. if l . cargo { g . cargo = true ; } Some ( g ) } } ; greater . proxy = match ( lesser . proxy . take ( ) , greater . proxy . take ( ) ) { ( None , None ) => None , ( Some ( val ) , None ) | ( None , Some ( val ) ) => Some ( val ) , ( Some ( _ ) , Some ( g ) ) => Some ( g ) , // No meshing/merging. Only take the greater value. } ; greater . hooks = match ( lesser . hooks . take ( ) , greater . hooks . take ( ) ) { ( None , None ) => None , ( Some ( val ) , None ) | ( None , Some ( val ) ) => Some ( val ) , ( Some ( _ ) , Some ( g ) ) => Some ( g ) , // No meshing/merging. Only take the greater value. } ; greater }
Merge the given layers, where the `greater` layer takes precedence.
Merge the given layers where the ` greater ` layer takes precedence .
lesser
Self
greater
Self
lesser
Self
greater
Self