Fix compatibility issue with sysinfo 0.31.0
This commit is contained in:
		@@ -171,7 +171,7 @@ pub async fn network_hook_status() -> HttpResult {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
pub async fn number_vcpus() -> HttpResult {
 | 
					pub async fn number_vcpus() -> HttpResult {
 | 
				
			||||||
    let mut system = System::new();
 | 
					    let mut system = System::new();
 | 
				
			||||||
    system.refresh_cpu();
 | 
					    system.refresh_cpu_all();
 | 
				
			||||||
    let number_cpus = system.cpus().len();
 | 
					    let number_cpus = system.cpus().len();
 | 
				
			||||||
    assert_ne!(number_cpus, 0, "Got invlid number of CPU!");
 | 
					    assert_ne!(number_cpus, 0, "Got invlid number of CPU!");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user