PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: planetlabs/planet-client-python (python)

Issue:
Unable to get single mosaic metadata
The `planet mosaic` command appears to be broken in 0.0.3:

```
$ planet mosaic color_balance_mosaic
Error: MissingResource: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server.  If you entered the URL manually please check your spelling and try again.</p>
```

`color_balance_mosaic` does appear when `planet mosaics` is run.

Pull request:
remove trailing slash on mosaic url
closes #78

Patch:
diff --git a/planet/api/client.py b/planet/api/client.py
index 81d21ca..2b1cc0b 100644
--- a/planet/api/client.py
+++ b/planet/api/client.py
@@ -184,7 +184,7 @@ class Client(object):
         :param name:
             Mosaic name as returned by `list_mosaics`.
         """
-        return self._get('mosaics/%s/' % name).get_body()
+        return self._get('mosaics/%s' % name).get_body()
 
     def get_mosaic_quads(self, name, intersects=None, count=50):
         """


Test patch:
diff --git a/tests/test_mosaics.py b/tests/test_mosaics.py
index 04882a4..84b4b30 100644
--- a/tests/test_mosaics.py
+++ b/tests/test_mosaics.py
@@ -43,7 +43,7 @@ def test_get_mosaic():
 
         text = read_fixture('get-mosaic.json')
         uri = os.path.join(client.base_url,
-                           'mosaics/%s/' % mosaic_name)
+                           'mosaics/%s' % mosaic_name)
         m.get(uri, text=text, status_code=200)
 
         r = client.get_mosaic(mosaic_name)
Repository: dtolnay/async-trait (rust)

Issue:
Use parentheses to disambiguate impl Trait
```rust
use async_trait::async_trait;

#[async_trait]
pub trait Trait {
    async fn f(arg: &impl Trait);
}
```

currently fails with:

```console
error: ambiguous `+` in a type
 --> src/main.rs:5:22
  |
5 |     async fn f(arg: &impl Trait);
  |                      ^^^^^^^^^^ help: use parentheses to disambiguate: `(impl 'async_trait + Trait)`
```

Pull request:
Use parentheses to disambiguate impl Trait
Fixes #204.

Patch:
diff --git a/src/lifetime.rs b/src/lifetime.rs
index d8e8d88..7ceda4f 100644
--- a/src/lifetime.rs
+++ b/src/lifetime.rs
@@ -1,7 +1,9 @@
-use proc_macro2::Span;
+use proc_macro2::{Span, TokenStream};
+use std::mem;
 use syn::visit_mut::{self, VisitMut};
 use syn::{
-    parse_quote_spanned, Expr, GenericArgument, Lifetime, Receiver, TypeImplTrait, TypeReference,
+    parse_quote_spanned, token, Expr, GenericArgument, Lifetime, Receiver, Type, TypeImplTrait,
+    TypeParen, TypeReference,
 };
 
 pub struct CollectLifetimes {
@@ -78,6 +80,17 @@ impl VisitMut for AddLifetimeToImplTrait {
         visit_mut::visit_type_impl_trait_mut(self, ty);
     }
 
+    fn visit_type_reference_mut(&mut self, ty: &mut TypeReference) {
+        if let Type::ImplTrait(_) = *ty.elem {
+            let elem = mem::replace(&mut *ty.elem, Type::Verbatim(TokenStream::new()));
+            *ty.elem = Type::Paren(TypeParen {
+                paren_token: token::Paren(ty.and_token.span),
+                elem: Box::new(elem),
+            });
+        }
+        visit_mut::visit_type_reference_mut(self, ty);
+    }
+
     fn visit_expr_mut(&mut self, _e: &mut Expr) {
         // Do not recurse into impl Traits inside of an array length expression.
         //


Test patch:
diff --git a/tests/test.rs b/tests/test.rs
index 87897b1..6859639 100644
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -1439,3 +1439,13 @@ pub mod issue199 {
         assert_eq!(counter.get(), 1);
     }
 }
+
+// https://github.com/dtolnay/async-trait/issues/204
+pub mod issue204 {
+    use async_trait::async_trait;
+
+    #[async_trait]
+    pub trait Trait {
+        async fn f(arg: &impl Trait);
+    }
+}
Repository: dtolnay/cxx (rust)

Issue:
let_cxx_string blocks async fn's Future from being Send
This error is wrong, std::string is fine to access from across threads.

```rust
use cxx::{let_cxx_string, CxxString};

async fn f() {
    let_cxx_string!(s = "...");

    async fn g(_: &CxxString) {}
    g(&s).await;
}

fn main() {
    fn assert_send(_: impl Send) {}
    assert_send(f());
}
```

```console
error: future cannot be sent between threads safely
  --> src/main.rs:12:5
   |
11 |     fn assert_send(_: impl Send) {}
   |                            ---- required by this bound in `assert_send`
12 |     assert_send(f());
   |     ^^^^^^^^^^^ future returned by `f` is not `Send`
   |
   = help: within `impl Future`, the trait `Send` is not implemented for `*const ()`
note: future is not `Send` as this value is used across an await
  --> src/main.rs:7:5
   |
4  |     let_cxx_string!(s = "...");
   |     --------------------------- has type `StackString` which is not `Send`
...
7  |     g(&s).await;
   |     ^^^^^^^^^^^ await occurs here, with `mut $var` maybe used later
8  | }
   | - `mut $var` is later dropped here
```

Pull request:
Allow Send/Sync of let_cxx_string
Fixes #693.

Patch:
diff --git a/src/cxx_string.rs b/src/cxx_string.rs
index 10abbcef..08a58b11 100644
--- a/src/cxx_string.rs
+++ b/src/cxx_string.rs
@@ -188,7 +188,7 @@ impl PartialEq<str> for CxxString {
 pub struct StackString {
     // Static assertions in cxx.cc validate that this is large enough and
     // aligned enough.
-    space: MaybeUninit<[*const (); 8]>,
+    space: MaybeUninit<[usize; 8]>,
 }
 
 impl StackString {


Test patch:
diff --git a/tests/cxx_string.rs b/tests/cxx_string.rs
new file mode 100644
index 00000000..be693cd2
--- /dev/null
+++ b/tests/cxx_string.rs
@@ -0,0 +1,15 @@
+use cxx::{let_cxx_string, CxxString};
+
+#[test]
+fn test_async_cxx_string() {
+    async fn f() {
+        let_cxx_string!(s = "...");
+
+        async fn g(_: &CxxString) {}
+        g(&s).await;
+    }
+
+    // https://github.com/dtolnay/cxx/issues/693
+    fn assert_send(_: impl Send) {}
+    assert_send(f());
+}