[ 
https://issues.apache.org/jira/browse/THRIFT-4330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16168561#comment-16168561
 ] 

ASF GitHub Bot commented on THRIFT-4330:
----------------------------------------

Github user sadikovi commented on the issue:

    https://github.com/apache/thrift/pull/1360
  
    @allengeorge When I compile parquet-rs library I get following warnings 
([parquet.thrift](https://github.com/sadikovi/parquet-rs/blob/master/src/parquet_thrift/parquet.thrift))
    
    ```shell
    warning: unused extern crate
     --> src/parquet_thrift/parquet.rs:8:1
      |
    8 | extern crate ordered_float;
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |
      = note: #[warn(unused_extern_crates)] on by default
    
    warning: unused extern crate
      --> src/parquet_thrift/parquet.rs:10:1
       |
    10 | extern crate try_from;
       | ^^^^^^^^^^^^^^^^^^^^^^
    ```
    
    This happens when `extern crate ...` is already defined in 
[lib.rs](https://github.com/sadikovi/parquet-rs/blob/master/src/lib.rs) for the 
library.


> Allow unused crates in Rust files
> ---------------------------------
>
>                 Key: THRIFT-4330
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4330
>             Project: Thrift
>          Issue Type: Improvement
>            Reporter: Ivan Sadikov
>            Priority: Trivial
>             Fix For: 0.11.0
>
>
> Currently thrift generated .rs files include following attributes:
> #![allow(unused_imports)]
> #![cfg_attr(feature = "cargo-clippy", allow(too_many_arguments, 
> type_complexity))]
> #![cfg_attr(rustfmt, rustfmt_skip)] 
> I propose to add 
> #![allow(unused_extern_crates)]
> to remove warning when using Rust nightly.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to