sapling/eden
David Tolnay 6d2591eb93 Make Thrift server creation safe using cxx UniquePtr
Summary:
The safe signature is possible as of {D30180770 (ff5931b944)} but has been separated out of that diff because it requires this codemod of a large number of downstream service implementations.

 ---

API before:

```
impl ThriftServerBuilder {
    pub unsafe fn with_metadata(mut self, metadata: *mut RustThriftMetadata) -> Self;
}
```

API after:

```
impl ThriftServerBuilder {
    pub fn with_metadata(mut self, metadata: UniquePtr<RustThriftMetadata>) -> Self;
}
```

 ---

Call site before:

```
let thrift = unsafe {
    ThriftServerBuilder::new(fb)
        .with_port(thrift_options.port)
        .with_metadata(create_metadata())
        .with_max_requests(thrift_options.max_requests)
        .with_factory(exec, move || service)
        .build()
};
```

Call site after:

```
let thrift = ThriftServerBuilder::new(fb)
    .with_port(thrift_options.port)
    .with_metadata(create_metadata())
    .with_max_requests(thrift_options.max_requests)
    .with_factory(exec, move || service)
    .build();
```

Reviewed By: guswynn

Differential Revision: D30180772

fbshipit-source-id: f8137b9f91b7c7b5de5bdee9dfd0b7925399cee2
2021-08-11 04:28:52 -07:00
..
fs pool eden thrift connections 2021-08-10 18:57:52 -07:00
hg-server remove use of chashmap 2021-08-03 13:07:18 -07:00
integration integration: make tests compatible on Windows 2021-08-05 17:34:25 -07:00
locale
mononoke Make Thrift server creation safe using cxx UniquePtr 2021-08-11 04:28:52 -07:00
scm metrics: add println renderer 2021-08-10 14:11:23 -07:00
test_support fix systemd tests locally 2021-07-09 17:24:11 -07:00
test-data fix fsck snapshot integration tests 2021-07-14 16:20:04 -07:00
.gitignore
Eden.project.toml