Skip to content

Commit

Permalink
去掉未使用的导入
Browse files Browse the repository at this point in the history
  • Loading branch information
wanglei13866 committed Oct 8, 2024
1 parent f6ee20b commit 02ca7e8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/hostcalls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use std::f32::consts::E;
use crate::dispatcher;
use crate::types::*;
use std::ptr::{null, null_mut};
Expand Down Expand Up @@ -271,7 +270,7 @@ pub fn get_map_value(map_type: MapType, key: &str) -> Result<Option<String>, Sta
Ok(string) => Ok(Some(string)), // Successfully converted to String
Err(e) => {
error!("[get_map_value] Failed to convert to UTF-8 string: {}", e);
Err(Status::BadArgument) // Return an appropriate error
Err(Status::SerializationFailure) // Return an appropriate error
}
}
} else {
Expand Down Expand Up @@ -1298,7 +1297,6 @@ pub fn increment_metric(metric_id: u32, offset: i64) -> Result<(), Status> {
mod utils {
use crate::types::Bytes;
use std::convert::TryFrom;
use std::ptr::replace;
use log::error;

pub(super) fn serialize_property_path(path: Vec<&str>) -> Bytes {
Expand Down

0 comments on commit 02ca7e8

Please sign in to comment.