-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[E0596] cannot borrow data in an Arc as mutable. #6
Comments
Hey @ArunGust! Yeah this is an annoying design limitation that I'm going to resolve in version |
thanks |
Alright
|
Thanks a lot, let me try |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you @pjtatlow
I tried to clone and pass-through Arc, but it shows [E0596] cannot borrow data in an Arc as mutable. Any idea ?
let jdb = jammdb::DB::open("../jammdb").unwrap();
HttpServer::new(move || {
App::new()
.data(jdb.clone())
async fn fn_inituserdb(req: HttpRequest, _jdb: Datajammdb::DB) ->Result<String, Error> {
let _tx = _jdb.tx(true).borrow_mut().as_ref().map_err(|e| actix_web::http::StatusCode::BAD_REQUEST);
| ^^^^ cannot borrow as mutable
[E0596] cannot borrow data in an Arc as mutable.
[Note] cannot borrow as mutable
The text was updated successfully, but these errors were encountered: