@@ -3,10 +3,10 @@ use std::io::Cursor;
3
3
use std:: path:: PathBuf ;
4
4
use std:: process:: exit;
5
5
6
+ use crate :: utils:: prelude:: * ;
6
7
use indicatif:: ProgressBar ;
7
8
use nbt_lib:: NBTDeserializeBytes ;
8
9
use tracing:: { error, info, trace, warn} ;
9
- use crate :: utils:: prelude:: * ;
10
10
11
11
use crate :: state:: GlobalState ;
12
12
use crate :: utils:: error:: Error ;
@@ -58,9 +58,7 @@ async fn get_total_chunks(dir: PathBuf) -> Result<usize> {
58
58
}
59
59
60
60
/// since this is just used to import chunks, it doesn't need to be optimized much
61
- pub async fn import_regions (
62
- state : GlobalState ,
63
- ) -> Result < ( ) > {
61
+ pub async fn import_regions ( state : GlobalState ) -> Result < ( ) > {
64
62
let dir = if env:: var ( "FERRUMC_ROOT" ) . is_ok ( ) {
65
63
PathBuf :: from ( env:: var ( "FERRUMC_ROOT" ) . unwrap ( ) ) . join ( "import" )
66
64
} else {
@@ -195,15 +193,18 @@ pub async fn import_regions(
195
193
196
194
#[ cfg( test) ]
197
195
mod test {
198
- use tokio:: net:: TcpListener ;
199
-
200
196
use crate :: create_state;
201
197
use crate :: utils:: setup_logger;
198
+ use tokio:: net:: TcpListener ;
199
+ use tracing:: warn;
202
200
203
201
#[ tokio:: test]
202
+ #[ ignore]
204
203
async fn get_chunk_at ( ) {
205
204
// set environment variable "FERRUMC_ROOT" to the root of the ferrumc project
206
- setup_logger ( ) . unwrap ( ) ;
205
+ if setup_logger ( ) . is_ok ( ) {
206
+ warn ! ( "Logger already set up" ) ;
207
+ }
207
208
let listener = TcpListener :: bind ( "0.0.0.0:0" ) . await . unwrap ( ) ;
208
209
let state = create_state ( listener) . await . unwrap ( ) ;
209
210
0 commit comments