Replace some of context.sql.get_config() with context.get_config()

Pattern `context.sql.get_config(context, {foo})` is unnecessary
redundant in Rust: unlike C, Rust has associated functions (methods).
This commit is contained in:
Dmitry Bogatov
2019-09-12 04:41:06 +00:00
parent c5803d9b4c
commit 500e80784a
4 changed files with 8 additions and 6 deletions

View File

@@ -2,6 +2,7 @@ use std::ffi::CString;
use std::path::{Path, PathBuf};
use crate::chatlist::*;
use crate::config::*;
use crate::constants::*;
use crate::contact::*;
use crate::context::Context;
@@ -267,7 +268,7 @@ impl Chat {
return Ok(0);
}
if let Some(from) = context.sql.get_config(context, "configured_addr") {
if let Some(from) = context.get_config(Config::ConfiguredAddr) {
let new_rfc724_mid = {
let grpid = match self.typ {
Chattype::Group | Chattype::VerifiedGroup => Some(self.grpid.as_str()),