From 3959bbe82cde527ed96ae324ff0db31a18d63a1e Mon Sep 17 00:00:00 2001 From: Luke <11898833+curlpipe@users.noreply.github.com> Date: Sat, 2 Nov 2024 20:51:32 +0000 Subject: [PATCH] Fixed errors that were hidden before --- src/config/editor.rs | 3 +-- src/main.rs | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/config/editor.rs b/src/config/editor.rs index 8808e20..dd471f0 100644 --- a/src/config/editor.rs +++ b/src/config/editor.rs @@ -1,9 +1,8 @@ /// Defines the Editor API for plug-ins to use use crate::cli::VERSION; -use crate::config::Document; use crate::editor::Editor; use crate::ui::Feedback; -use crate::{fatal_error, PLUGIN_BOOTSTRAP, PLUGIN_MANAGER, PLUGIN_NETWORKING, PLUGIN_RUN}; +use crate::{config, fatal_error, PLUGIN_BOOTSTRAP, PLUGIN_MANAGER, PLUGIN_NETWORKING, PLUGIN_RUN}; use kaolinite::utils::{get_absolute_path, get_cwd, get_file_ext, get_file_name}; use kaolinite::{Loc, Size}; use mlua::prelude::*; diff --git a/src/main.rs b/src/main.rs index b89b23a..a82ec77 100644 --- a/src/main.rs +++ b/src/main.rs @@ -101,8 +101,8 @@ fn run(cli: &CommandLineInterface) -> Result<()> { .get("file_types") .unwrap_or(Value::Table(lua.create_table()?)); let file_types = FileTypes::from_lua(file_types, &lua).unwrap_or_default(); - let config = ged!(mut &editor).config; - let document = config.document.borrow_mut::().unwrap(); + let config = &mut ged!(mut &editor).config; + let mut document = config.document.borrow_mut::().unwrap(); document.file_types = file_types; // Open files user has asked to open