allengeorge commented on code in PR #2632:
URL: https://github.com/apache/thrift/pull/2632#discussion_r915395130


##########
lib/rs/src/server/multiplexed.rs:
##########
@@ -272,10 +271,10 @@ mod tests {
             _: &mut dyn TInputProtocol,
             _: &mut dyn TOutputProtocol,
         ) -> crate::Result<()> {
-            let res = self
-                .invoked
-                .compare_and_swap(false, true, Ordering::Relaxed);
-            if res {
+            let res =

Review Comment:
   Interesting: I had no idea this was deprecated now.



##########
test/rs/src/bin/test_client.rs:
##########
@@ -492,8 +483,8 @@ fn make_thrift_calls(
         s_cmp_nested_2.insert(Numberz::SIX, empty_insanity);
 
         let mut s_cmp: BTreeMap<UserId, BTreeMap<Numberz, Insanity>> = 
BTreeMap::new();
-        s_cmp.insert(1 as UserId, s_cmp_nested_1);
-        s_cmp.insert(2 as UserId, s_cmp_nested_2);
+        s_cmp.insert(1_i64, s_cmp_nested_1);

Review Comment:
   Could you leave these two as before please?



##########
lib/rs/test/src/bin/kitchen_sink_client.rs:
##########
@@ -33,7 +33,6 @@ use kitchen_sink::recursive;
 use kitchen_sink::recursive::{CoRec, CoRec2, RecList, RecTree, 
TTestServiceSyncClient};
 use kitchen_sink::ultimate::{FullMealServiceSyncClient, 
TFullMealServiceSyncClient};
 
-use thrift;

Review Comment:
   Is there a reason we don't have to include the `use` definition here?



##########
test/rs/src/lib.rs:
##########
@@ -15,5 +15,11 @@
 // specific language governing permissions and limitations
 // under the License.
 
+// FIXME - need changes in gen before lifting this exception
+#![allow(

Review Comment:
   Could you create a followup JIRA for this?



##########
lib/rs/src/protocol/compact.rs:
##########
@@ -83,15 +83,13 @@ where
     fn read_list_set_begin(&mut self) -> crate::Result<(TType, i32)> {
         let header = self.read_byte()?;
         let element_type = collection_u8_to_type(header & 0x0F)?;
-
-        let element_count;
         let possible_element_count = (header & 0xF0) >> 4;
-        if possible_element_count != 15 {
+        let element_count = if possible_element_count != 15 {

Review Comment:
   Oh - didn't know you could do that now.



##########
test/rs/src/bin/test_server.rs:
##########
@@ -16,14 +16,12 @@
 // under the License.
 
 use clap::{clap_app, value_t};
-use env_logger;

Review Comment:
   I'm a little surprised that we don't need the use declaration anymore.



##########
test/rs/src/bin/test_client.rs:
##########
@@ -492,8 +483,8 @@ fn make_thrift_calls(
         s_cmp_nested_2.insert(Numberz::SIX, empty_insanity);
 
         let mut s_cmp: BTreeMap<UserId, BTreeMap<Numberz, Insanity>> = 
BTreeMap::new();
-        s_cmp.insert(1 as UserId, s_cmp_nested_1);
-        s_cmp.insert(2 as UserId, s_cmp_nested_2);
+        s_cmp.insert(1_i64, s_cmp_nested_1);
+        s_cmp.insert(2_i64, s_cmp_nested_2);

Review Comment:
   And this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to