From 204cd438e43e1f9b68e84b63399936bdb8a7e1de Mon Sep 17 00:00:00 2001 From: Frankie Foston Date: Thu, 12 Nov 2020 09:08:16 +0000 Subject: [PATCH 1/2] [deps] remove libc and minimise required chrono features --- Cargo.toml | 4 +--- src/sgp4_sys.rs | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3b69804..79e0922 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,9 +15,7 @@ build = "build.rs" links = "static=sgp4" [dependencies] -chrono = { version="0.4" } -time = "0.2.16" -libc = "0.2.71" +chrono = { version="0.4", default-features=false } thiserror = "1.0" [build-dependencies] diff --git a/src/sgp4_sys.rs b/src/sgp4_sys.rs index d08003d..31af3cb 100644 --- a/src/sgp4_sys.rs +++ b/src/sgp4_sys.rs @@ -4,9 +4,7 @@ //! rely heavily on `unsafe` code, and it is recommended to instead use the other, high level //! bindings provided by the `sgp4` crate. -extern crate libc; - -use libc::{c_char, c_double, c_int, c_long}; +use std::os::raw::{c_char, c_double, c_int, c_long}; use std::ffi::{CString, NulError}; use chrono::prelude::*; From d5e3cb5f24e6ff3cc2ba18d4c3e83d13e6084023 Mon Sep 17 00:00:00 2001 From: Frankie Foston Date: Thu, 12 Nov 2020 09:15:09 +0000 Subject: [PATCH 2/2] [misc] run cargo fmt --- src/sgp4_sys.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sgp4_sys.rs b/src/sgp4_sys.rs index 31af3cb..fc37f08 100644 --- a/src/sgp4_sys.rs +++ b/src/sgp4_sys.rs @@ -4,8 +4,8 @@ //! rely heavily on `unsafe` code, and it is recommended to instead use the other, high level //! bindings provided by the `sgp4` crate. -use std::os::raw::{c_char, c_double, c_int, c_long}; use std::ffi::{CString, NulError}; +use std::os::raw::{c_char, c_double, c_int, c_long}; use chrono::prelude::*; use chrono::DateTime;