INNER CODE UNIT · Rust

remove_plugins_from_url

Drew-Alleman/DataSurgeon · src/plugins/mod.rs:272

pub fn remove_plugins_from_url(url: &str) -> bool {
    // Load the existing plugins
    let url = url.trim_end_matches('/');
    let mut existing_plugins = load_plugins();

    // Check if any of the existing plugins were added from the specified URL
    let mut removed = false;
    for i in (0..existing_plugins.len()).rev() {
        let normalized_url = normalize_url(&url);
        let plugin_url = normalize_url(&existing_plugins[i].source_url);
        if plugin_url == normalized_url {
            // Remove the plugin
            existing_plugins.remove(i);
            removed = true;
        }
    }

    if removed {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…