Skip to content

Commit

Permalink
Delete fbthrift::types
Browse files Browse the repository at this point in the history
Summary: This dates way back to the old Haskell-based compiler (D8961378). There is no reason for this in the "new" compiler.

Reviewed By: zertosh

Differential Revision: D53214333

fbshipit-source-id: c9f7bc95325b749b4103596bef9ccf8ad3ad17b1
  • Loading branch information
David Tolnay authored and facebook-github-bot committed Jan 30, 2024
1 parent aa201ff commit 4b1e282
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 26 deletions.
4 changes: 2 additions & 2 deletions thrift/compiler/generate/templates/rust/lib/errors.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub mod {{service:snake}} {
{{#function:exceptions}}
{{field:rust_name}}({{#field:type}}{{>lib/type}}{{/field:type}}),
{{/function:exceptions}}
ApplicationException(::fbthrift::types::ApplicationException),
ApplicationException(::fbthrift::ApplicationException),
ThriftError(::anyhow::Error),
}

Expand Down Expand Up @@ -206,7 +206,7 @@ pub mod {{service:snake}} {
{{#function:stream_exceptions}}
{{field:rust_name}}({{#field:type}}{{>lib/type}}{{/field:type}}),
{{/function:stream_exceptions}}
ApplicationException(::fbthrift::types::ApplicationException),
ApplicationException(::fbthrift::ApplicationException),
ThriftError(::anyhow::Error),
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion thrift/compiler/test/fixtures/doctext/gen-rust/errors.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions thrift/compiler/test/fixtures/exceptions/gen-rust/errors.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions thrift/compiler/test/fixtures/stream/gen-rust/errors.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions thrift/lib/rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,6 @@ mod tests;
#[doc(hidden)]
pub mod help;

pub mod types {
// Define ApplicationException as if it were a normal generated type to make things simpler
// for codegen.
pub use crate::application_exception::ApplicationException;
}

pub use crate::application_exception::ApplicationException;
pub use crate::application_exception::ApplicationExceptionErrorCode;
pub use crate::binary_protocol::BinaryProtocol;
Expand Down

0 comments on commit 4b1e282

Please sign in to comment.