grpc / grpc/grpc-rust

Relax bounds on `Builder::compile_protos` and `Builder::compile_with_config`

Open
#2,433 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
12.5k
Forks
1.3k
Avg merge
4d 7h
Merged PRs (30d)
24

Description

## Feature Request

### Crates

`tonic-prost-build`

### Motivation

Before the split out, `Builder::compile_protos` and `Builder::compile_with_config` used `impl AsRef` for both arguments (`protos` and `includes`) which allowed you to pass a `String` to one arg and a `PathBuf` to another one, making the usage more ergonomic.

With the split into `tonic-prost-build` both arguments now share a single bound. There wasn't a reason given for this change.

### Proposal

Change to
```rust
pub fn compile_protos(self, protos: &[P], includes: &[I]) -> io::Result<()>
where
P: AsRef,
I: AsRef
```

### Alternatives

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.