We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8950754 commit 95f816cCopy full SHA for 95f816c
1 file changed
fuzon-http/src/main.rs
@@ -43,7 +43,7 @@ struct Config {
43
#[derive(Clone, Debug)]
44
struct AppState {
45
// TODO: Add doc what these dict maps.
46
- collections: Arc<HashMap<String, TermMatcher>>,
+ collections: HashMap<String, TermMatcher>,
47
}
48
49
impl AppState {
@@ -60,9 +60,7 @@ impl AppState {
60
61
info!("Initialized with: {:?}", &data);
62
63
- AppState {
64
- collections: Arc::new(collections),
65
- }
+ AppState { collections }
66
67
68
@@ -122,7 +120,7 @@ async fn async_main() -> std::io::Result<()> {
122
120
let host = config.host.clone();
123
121
let port = config.port as u16;
124
125
- let data = AppState::from_config(config);
+ let data = Arc::new(AppState::from_config(config));
126
127
HttpServer::new(move || {
128
App::new()
0 commit comments