Skip to content

Commit

Permalink
fix: remove wrapping error object in RefCell
Browse files Browse the repository at this point in the history
  • Loading branch information
justinbarclay committed Sep 12, 2024
1 parent 7ef910a commit 172e71a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "parinfer_rust"
version = "0.4.6"
version = "0.4.7"
authors = ["Jason Felice <[email protected]>"]

[lib]
Expand Down
4 changes: 2 additions & 2 deletions src/emacs_wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use super::parinfer::rc_process;
use emacs::{Env, FromLisp, IntoLisp, Result, Value};
use types::{Change, Error, Options, Request, SharedRequest, WrappedAnswer};

use std::{cell::RefCell, convert::TryFrom, fs::OpenOptions, io::Write, rc::Rc};
use std::{convert::TryFrom, fs::OpenOptions, io::Write, rc::Rc};

emacs::plugin_is_GPL_compatible!();

Expand Down Expand Up @@ -643,7 +643,7 @@ fn get_answer<'a>(env: &'a Env, answer: &WrappedAnswer, key: AnswerKey) -> Resul
AnswerKey::Text => unwrapped_answer.text.to_string().into_lisp(env),
AnswerKey::Success => unwrapped_answer.success.into_lisp(env),
AnswerKey::Error => match unwrapped_answer.error.clone() {
Some(error) => Ok(RefCell::new(error).into_lisp(env)?),
Some(error) => Ok(error.into_lisp(env)?),
None => ().into_lisp(env),
},
AnswerKey::CursorX => to_i64(unwrapped_answer.cursor_x).into_lisp(env),
Expand Down

0 comments on commit 172e71a

Please sign in to comment.