fix: cg fix

This commit is contained in:
Orion Kindel 2023-04-20 11:16:23 -05:00
parent 66a3784627
commit f3c8c02296
Signed by untrusted user who does not match committer: orion
GPG Key ID: 6D4165AE4C928719
11 changed files with 16 additions and 23 deletions

View File

@ -1,8 +1,8 @@
use core::primitive as rust; use core::primitive as rust;
use jni::objects::JObject; use jni::objects::JObject;
use jni::sys::{jbyteArray, jobject}; use jni::sys::jbyteArray;
use toad_jni::java::{self, Object}; use toad_jni::java;
#[allow(non_camel_case_types)] #[allow(non_camel_case_types)]
pub struct u64(java::lang::Object); pub struct u64(java::lang::Object);

View File

@ -2,7 +2,6 @@ pub mod ffi;
pub mod msg; pub mod msg;
mod retry_strategy; mod retry_strategy;
use std::net::{Ipv4Addr, SocketAddr};
use jni::objects::{JClass, JObject}; use jni::objects::{JClass, JObject};
use jni::sys::jobject; use jni::sys::jobject;

View File

@ -3,9 +3,7 @@ pub mod owned;
pub mod ref_; pub mod ref_;
mod ty; mod ty;
use jni::objects::JObject;
use jni::sys::jobject;
use toad_jni::java;
pub use ty::Type; pub use ty::Type;
mod payload; mod payload;

View File

@ -1,7 +1,7 @@
use std::collections::BTreeMap; use std::collections::BTreeMap;
use jni::objects::JObject; use jni::objects::JObject;
use jni::sys::{jbyteArray, jobject}; use jni::sys::jbyteArray;
use toad_jni::java::net::InetSocketAddress; use toad_jni::java::net::InetSocketAddress;
use toad_jni::java::util::ArrayList; use toad_jni::java::util::ArrayList;
use toad_jni::java::{self}; use toad_jni::java::{self};

View File

@ -1,11 +1,11 @@
use std::collections::BTreeMap; use std::collections::BTreeMap;
use jni::objects::{JClass, JObject, JThrowable}; use jni::objects::JObject;
use jni::sys::jobject; use jni::sys::jobject;
use toad::net::Addrd; use toad::net::Addrd;
use toad_jni::java::lang::Throwable; use toad_jni::java::lang::Throwable;
use toad_jni::java::net::InetSocketAddress; use toad_jni::java::net::InetSocketAddress;
use toad_jni::java::{self, Object, ResultYieldToJavaOrThrow}; use toad_jni::java::{self, ResultYieldToJavaOrThrow};
use toad_msg::MessageOptions; use toad_msg::MessageOptions;
use crate::dev::toad::ffi::Ptr; use crate::dev::toad::ffi::Ptr;
@ -137,7 +137,7 @@ pub extern "system" fn Java_dev_toad_msg_ref_Message_payload<'local>(mut env: ja
.map(|msg| { .map(|msg| {
msg.data() msg.data()
.content_format() .content_format()
.map(|f| { .map(|_f| {
Payload::new(e, msg.data().payload.0.iter().copied()) Payload::new(e, msg.data().payload.0.iter().copied())
}) })
.unwrap_or_else(|| { .unwrap_or_else(|| {

View File

@ -1,8 +1,8 @@
use jni::objects::{JClass, JObject}; use jni::objects::JObject;
use jni::sys::jobject; use jni::sys::jobject;
use jni::JNIEnv; use jni::JNIEnv;
use toad_jni::java::lang::Throwable; use toad_jni::java::lang::Throwable;
use toad_jni::java::{self, Object, ResultYieldToJavaOrThrow}; use toad_jni::java::{self, ResultYieldToJavaOrThrow};
use toad_msg::OptNumber; use toad_msg::OptNumber;
use super::OptValue; use super::OptValue;

View File

@ -1,4 +1,4 @@
use jni::objects::{JClass, JObject}; use jni::objects::JObject;
use jni::sys::jobject; use jni::sys::jobject;
use toad_jni::java::lang::Throwable; use toad_jni::java::lang::Throwable;
use toad_jni::java::{self, ResultYieldToJavaOrThrow}; use toad_jni::java::{self, ResultYieldToJavaOrThrow};

View File

@ -3,8 +3,6 @@ use jni::sys::jobject;
use tinyvec::ArrayVec; use tinyvec::ArrayVec;
use toad_jni::java::{self, Object}; use toad_jni::java::{self, Object};
use crate::dev::toad::ffi;
pub struct Token(java::lang::Object); pub struct Token(java::lang::Object);
java::object_newtype!(Token); java::object_newtype!(Token);
impl java::Class for Token { impl java::Class for Token {

View File

@ -1,6 +1,6 @@
use toad::retry::Strategy; use toad::retry::Strategy;
use toad::time::Millis; use toad::time::Millis;
use toad_jni::java::{self, Object}; use toad_jni::java;
use crate::dev::toad::ffi; use crate::dev::toad::ffi;

View File

@ -4,13 +4,12 @@ use no_std_net::SocketAddr;
use toad::config::Config; use toad::config::Config;
use toad::net::Addrd; use toad::net::Addrd;
use toad::platform::Platform; use toad::platform::Platform;
use toad_jni::java::net::StandardProtocolFamily::INet; use toad_jni::java::nio::channels::PeekableDatagramChannel;
use toad_jni::java::nio::channels::{DatagramChannel, PeekableDatagramChannel}; use toad_jni::java::{self};
use toad_jni::java::{self, Object, Signature};
use toad_msg::alloc::Message; use toad_msg::alloc::Message;
use toad_msg::{Code, Id, Token, Type}; use toad_msg::{Code, Id, Token, Type};
use crate::{dev, Runtime}; use crate::dev;
type RustRuntime = type RustRuntime =
toad::std::Platform<toad::std::dtls::N, toad::step::runtime::std::Runtime<toad::std::dtls::N>>; toad::std::Platform<toad::std::dtls::N, toad::step::runtime::std::Runtime<toad::std::dtls::N>>;

View File

@ -12,10 +12,9 @@ mod runtime {
use toad::platform::{Effect, Platform}; use toad::platform::{Effect, Platform};
use toad::step::runtime::Runtime as DefaultSteps; use toad::step::runtime::Runtime as DefaultSteps;
use toad_jni::java::io::IOException; use toad_jni::java::io::IOException;
use toad_jni::java::lang::System;
use toad_jni::java::nio::channels::PeekableDatagramChannel; use toad_jni::java::nio::channels::PeekableDatagramChannel;
use toad_jni::java::util::logging::{ConsoleHandler, Level, Logger}; use toad_jni::java::util::logging::{ConsoleHandler, Level, Logger};
use toad_jni::java::{self, Object, ResultExt, Signature}; use toad_jni::java::{self};
use toad_msg::{OptNumber, OptValue}; use toad_msg::{OptNumber, OptValue};
#[derive(Clone, Copy, Debug)] #[derive(Clone, Copy, Debug)]
@ -120,7 +119,7 @@ pub mod e2e;
#[cfg(test)] #[cfg(test)]
pub mod test { pub mod test {
use std::net::{Ipv4Addr, SocketAddr};
use std::path::PathBuf; use std::path::PathBuf;
use std::process::Command; use std::process::Command;
use std::sync::Once; use std::sync::Once;