sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Tracking issue for `Result::into_ok`
Labels: T-libs-api,B-unstable,C-tracking-issue,A-result-option,Libs-Tracked,Libs-Small

I would like to propose adding a `unwrap_infallible` associated function to `core::result::Result`. The purpose is to convert `Result<T, core::convert::Infallible>` to a `T`, as the error case is impossible.

The implementation would basically be:

```rust
impl<T> Result<T, Infallible> {
    #[inline]
    pub fn unwrap_infallible(self) -> T {
        match self {
            Ok(value) => value,
        }
    }
}
```

An example use-case I have is a wrapper type with generic value verification, like `Handle<T:Verify>`. Some verifications can fail, but some can not. When verification is infallible, a `Result<Handle<T>, Infallible>` will be returned.

Since some can fail, the `Handle` type implements `TryFrom` and not `From`. Because of the blanket implementation of `TryFrom` for all types implementing `From`, I can't additionally add a `From` conversion for the infallible cases. This blanket implementation makes sense, as it allows an API to take a `T: TryFrom` and handle all possible conversions, even infallible ones.

But for the API consumer it would be beneficial to be able to go from an infallible `Result<T, Infallible>` to a plain `T` without having to manually match or use `expect`. The latter is shorter and chainable, but has the disadvantage that it will still compile when the types are changed and the conversion is no longer infallible.

It might be that there is a different solution to infallible conversions via `TryFrom` in the future, for example via specialization. I believe that having an `unwrap_infallible` would still be beneficial in many other cases where generically fallible actions can be infallible in certain situations. One example is when working with a library that is based on fallible operations with a user supplied error type, but where the specific implementation from the user is infallible.

I'd be happy to work on a PR for this if it's acceptable to add, though I might require some guidance with regards to stability attributes, feature flags and so on. It's a bit hard to find information on that, and experimentation is costly as it takes me a while to complete a `./x.py test src/libcore` :)
Repository: TypeScript
Issue: Return type annotations ignored with recursive closures using JSDoc
Labels: Suggestion,Awaiting More Feedback

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:**  3.5.1

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
- "implicit any type"
- "circular reference"
- "jsdoc"
- "recursive"
- "closure"

**Code**

I have a fairly complex use case in a project which uses vanilla JS with type annotations in JSDoc comments. The long and the short is that there is a function which returns a function, which may recursively call itself and will reassign some closure variables.

Here is a silly example which gets the point across and demonstrates the same issue:

```js
/**
 * @returns {function(): number}
 */
function circular() {
  let rand = Math.random();

  return /** @type {function(): number} */ (function tryAgain() {
    if (rand < 0.5) {
      return rand;
    }

    rand = Math.random();
    return tryAgain();
  });
}
```

**Expected behavior:**

TypeScript should know that the return type of `tryAgain` is a number.

**Actual behavior:**

When run with:

```bash
tsc --allowJs --checkJs --noEmit --strict --target ES2017 *.js
```

The following error is thrown:

```
error TS7023: 'tryAgain' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
```

At the very least, this error seems pretty erroneous. The `tryAgain` function has _two_ return type annotations (I have tried both styles in an attempt to fix this). The larger issue is that I need some way to get TypeScript to compile this code without a massive refactor.

**Playground Link:** 

None (code is JavaScript).

**Related Issues:** 

This has a circular reference similar to [#26623](https://github.com/Microsoft/TypeScript/issues/26623). However for that issue the solution was to add an explicit return type annotation. In my case (perhaps because I am using JSDoc), TypeScript seems to be ignoring all explicit annotations.
Repository: flutter
Issue: google_maps_flutter: Allow setting map feature listeners lazily
Labels: p: maps,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

It is only possible to set `onTap` callbacks on `Marker/Circle/Polyline/Polygon` in the respective class's constructor. This prevents object creation in separate Isolates. It would be great if either the `onTap` fields were mutable or if `GoogleMap` hosted global `onTap[Marker|Circle|...]` callbacks.
Repository: youtube-dl
Issue: --reject-title exact match
Labels: question

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- Look through the README (http://yt-dl.org/readme) and FAQ (http://yt-dl.org/faq) for similar questions
- Search the bugtracker for similar questions: http://yt-dl.org/search-issues
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm asking a question
- [x] I've looked through the README and FAQ for similar questions
- [x] I've searched the bugtracker for similar questions including closed ones


## Question

<!--
Ask your question in an arbitrary form. Please make sure it's worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient.
-->

I'm trying to download videos from a certain channel that contain the word "First" in their title, but I want to avoid downloading videos that contain "Mythic+" in their title. The thing is, there are a lot of those "First" videos that contain the word "Mythic" and I can't download them because of my "Mythic+" filter. I'm using:

`youtube-dl -f '(299/137/298/136)+(251/bestaudio)' -o '/Volumes/Oliver HDD/Method/%(autonumber)s - %(release_date)s - %(title)s.%(ext)s' --match-title 'First' --reject-title 'Mythic+' https://www.youtube.com/watch?v=RubXDO7TYVs`

And I'm getting: "Method VS G'huun WORLD FIRST - Mythic Uldir" title matched reject pattern "Mythic+".

Is there any way to do this? 

I'd appreciate any help!
Repository: flutter
Issue: [image_picker] GIF resize loses animation
Labels: platform-android,p: image_picker,package,has reproducible steps,P2,found in release: 3.10,found in release: 3.11,team-android,triaged-android

Specifying maxWidth and maxHeight when picking a GIF will cause the animation to be lost.
Repository: go
Issue: x/tools/gopls: bad completion insertion after syntax error
Labels: help wanted,NeedsInvestigation,gopls

In this code

```go
package foo

func foo() {
	foo(a ...interface{})
	f<>
}
```

Completing "f" to "foo" ends up inserting "ffoo" instead of "foo". This is because the syntax error on the previous line completely obscures the "f" *ast.Ident, so we don't detect it properly as the prefix. Perhaps if we are in a BadExpr we could "manually" detect the surrounding identifier so completion still works to some degree?

/cc @stamblerre
Repository: godot
Issue: Colliding objects (RigidBody2d) gain energy
Labels: bug,confirmed,topic:physics

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:** 3.1.1
<!-- Specify commit hash if non-official. -->


**OS/device including version:** MacBookPro (Retinia 15", Mid 2015),  16gb, AMD Radeon R9 M370X 2048 MB, Intel Iris Pro 1536 MB, OS: MacOS High Sierra 10.13.6
<!-- Specify GPU model and drivers if graphics-related. -->


**Issue description:**
See enclosed screenshot. With "elastic" collisions, the "energy" of the system appears to increase, and eventually, a ball disappears. Eventually, all balls except one disappear.

![screen_shot](https://user-images.githubusercontent.com/45950182/59952827-8e28b000-944b-11e9-9544-0deadc2028ba.jpg)




I have several circular balls (`RigidBody2d`) enclosed by walls (`StaticBody2d`). They are given a random initial velocity and `linear_damp`, `angular_damp`, and `friction` are all set to 0. 
<!-- What happened, and what was expected. -->
Everything works fine for a while. The balls all collide with one another and the walls (like particles in an ideal gas). However, the "energy" (basically, the scalar speed) of the entire system slowly increases. After a while, a ball node completely disappears. The node is still in the list, however, and there are no noticeable error messages. Eventually, all the balls except one disappear.

**Steps to reproduce:**
Just run, and you will see this happen. Once running, click to add balls with random initial velocities. - try it with, say, 10 balls. Then let things progress. You will see the energy increasing, and after about 15 minutes (on my machine), a ball will disappear. After a while, another will disappear, and eventually, you will be left with a single ball, which seems to be fine as it bounces off the walls. 


**Minimal reproduction project:**
[gas.zip](https://github.com/godotengine/godot/files/3316114/gas.zip)


<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->
Repository: PowerToys
Issue: Disable Taskbar thumbnail preview
Labels: Idea-Enhancement,Product-Tweak UI Design

I would be really nice with an option to turn off the live taskbar thumbnail preivews. It's really annoying when using Remote Desktop in windowed mode or when using Parallells on a Mac. Often it overlaps another taskbar and you have to wait for it to disappear.
Repository: go
Issue: cmd/compile: prove pass unable to eliminate bounds check when a variable is assigned from len
Labels: Performance,NeedsInvestigation,compiler/runtime

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version devel +98100c56da Mon Jun 3 01:37:58 2019 +0000 linux/amd64
</pre>


### What did you do?
Consider - 

```go
func bce2(s string) {
	n := len(s)
	buf := make([]byte, n+1)
	for i := 0; i <= n; i++ {
		_ = buf[i] // bounds check
	}
}
```
The compiler is unable to prove that `buf[i]` will be always in range. But it should be, because n is positive, and len(buf) = n+1.

A hint of `_ = buf[n]` or alternatively, changing the bounds from `<= n` to `< len(buf)` fixes it.

This actually came from a real-world code from my levenshtein library. See https://github.com/agnivade/levenshtein/commit/1e1f2aee4191dd89ec83158f03f6e4c9cc60bcd9#diff-12f7126b3ca34e44fe76e482d22fba93R46.

### What did you expect to see?
No bounds check

### What did you see instead?
Bounds check

Apologies if this is already filed somewhere else. I did not see it in my search.

@zdjones @rasky 

Also @mvdan (we had a conversation on this on slack)
Repository: vue-element-admin
Issue: 浏览器窗口卡死
Labels: need repro :mag_right:

<!--
    注意：为更好的解决你的问题，请参考模板提供完整信息，准确描述问题，信息不全的 issue 将被关闭。

    Note: In order to better solve your problem, please refer to the template to provide complete information, accurately describe the problem, and the incomplete information issue will be closed.
-->


## Bug report（问题描述）
使用vue-admin-element打包之后，把文件发布到服务器上，如果js有报错，整个窗口就会卡死，关都关不掉，必须强制关闭浏览器

#### Steps to reproduce（问题复现步骤）

1.npm run build:prod
2.发布到线上
3.访问线上地址，如果js有报错就卡死
<!--
1. [xxx]
2. [xxx]
3. [xxxx]
-->

#### Screenshot or Gif（截图或动态图）


#### Link to minimal reproduction（最小可在线还原demo）

<!--
Please only use Codepen, JSFiddle, CodeSandbox or a github repo
-->

#### Other relevant information（格外信息）
- Your OS:
- Node.js version:
- vue-element-admin version:
Repository: flutter
Issue: Refactor platform views to respect the Activity lifecycle on Android
Labels: platform-android,engine,a: existing-apps,a: platform-views,P3,team-android,triaged-android

Refactor platform views to respect the Activity lifecycle on Android.

Up to the point of writing this ticket, the platform views API has been based on the old embedding, which always has an Activity available. The new embedding, and add-to-app use-cases in general, do not always have an Activity available. In fact, Activitys can come and go.

This ticket is to make platform views compatible with the lifecycle realities of the new Android embedding and add-to-app use-cases.

The expected steps are as follows:

- [ ] Platform Views registers part of itself as an `ActivityAware` `FlutterPlugin` to be notified of `Activity`s coming and going.
- [ ] When an `Activity` appears, the Platform Views system instantiates all platform Views that the app developer wants. When that `Activity` disappears, the Platform Views system destroys all existing platform Views that were previously instantiated.
- [ ] The Platform Views system automatically saves platform View state upon `Activity` disconnection, and restores that state upon `Activity` connection.
- [ ] The Platform Views system exposes Dart hooks that notify app developers about when a given platform View has been destroyed on the platform side, and when that platform View has been (re)created.
Repository: opencv
Issue: cv2 resize channel limited
Labels: category: python bindings,category: imgproc,RFC

##### System information (version)
- opencv-python == 4.1.0.25
- numpy == 1.15.0
- Operating System == MacOS Mojave 10.14.5

##### Detailed description
resize data which is multiple channels like 586 dimensions, code is as below:
```
data = np.random.uniform(low=0.0, high=1.0, size=(128, 586, 586))
data = cv2.resize(data, (256, 586), interpolation=cv2.INTER_LINEAR)
```
---------------------------------------------------------------------------
error                                     Traceback (most recent call last)
<ipython-input-36-4816150e3a28> in <module>()
      1 data = np.random.uniform(low=0.0, high=1.0, size=(128, 586, 586))
----> 2 data = cv2.resize(data, (256, 586), interpolation=cv2.INTER_LINEAR)

error: OpenCV(4.1.0) /Users/travis/build/skvark/opencv-python/opencv/modules/imgproc/src/resize.cpp:3361: error: (-215:Assertion failed) !dsize.empty() in function 'resize'
Repository: flutter
Issue: [google_maps_flutter] ACCESS_FINE_LOCATION permission always return NOT GRANTED on android
Labels: platform-android,customer: crowd,p: maps,package,has reproducible steps,P2,found in release: 1.22,found in release: 1.26,found in release: 2.0,found in release: 2.3,team-android,triaged-android

Hi!
I’m testing a Google_maps_flutter sample.

```console
E[/GoogleMapController]()(25499): Cannot enable MyLocation layer as location permissions are not granted
```

Google maps are displayed fine, but my current location function does not work as the above errors occur.

Of course, Manifest also declared!
`<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>`

I've tried the Google map app on simulator, but it works fine.

https://github.com/flutter/plugins/pull/910
I think it's related to this issue.

I'm using Google_maps_flutter version 0.5.16
The Android emulator is using the API 28 version.

Let me know if anyone has a similar problem. 🙌

```
[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.14.4 18E226, locale ko-KR)
    • Flutter version 1.5.4-hotfix.2 at /Users/Riky/Library/Flutter
    • Framework revision 7a4c33425d (6 weeks ago), 2019-04-29 11:05:24 -0700
    • Engine revision 52c7a1e849
    • Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)


[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/Riky/Library/Android/sdk
    • Android NDK at /Users/Riky/Library/Android/sdk/ndk-bundle
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/Riky/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.2, Build version 10E125
    • ios-deploy 1.9.4
    • CocoaPods version 1.6.1

[✓] Android Studio (version 3.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 31.3.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[✓] IntelliJ IDEA Ultimate Edition (version 2018.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 31.3.2
    • Dart plugin version 182.3569.4

[✓] VS Code (version 1.35.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.1.0

[✓] Connected device (1 available)
    • Android SDK built for x86 64 • emulator-5554 • android-x64 • Android 9 (API 28) (emulator)

• No issues found!
```
Repository: electron
Issue: downloadURL should have an optional destination argument
Labels: enhancement :sparkles:

Handling the save path in will-download event works, sometimes. But right now I'm having problem when I have a custom file location picker to let the user pick a recent location. When I call downloadURL the only way I see to use this custom path is by using some hacky variables and compare dates to check if it's recent.

A simple downloadURL(url, destination) would make things so much easier.

v5.0.2
Repository: kubernetes
Issue: Calculate oom_score_adj in a CPU-agnostic way, taking in consideration Pod Priority too
Labels: priority/backlog,sig/node,kind/feature,triage/accepted


**What would you like to be added**:

I would like to start a conversation to understand if we may improve `GetContainerOOMScoreAdjust` to:

1. Calculate the `oom_score_adj` in a CPU-agnosticy way
2. Take in account Pod Priority too


**Why is this needed**:

Currently, the `kubelet` sets a `oom_score_adj` value for each container based on the Pod QoS:

- `Guaranteed`: `-998`
- `BestEffort`: `1000`
- `Burstable`: `min(max(2, 1000 - (1000 * memoryRequestBytes) / machineMemoryCapacityBytes), 999)`

The QoS class depends both on the CPU and memory requests/limits, which means the `oom_score_adj` also depends on the CPU resources and not just on the memory resources, while OOM score is a purely memory management thing. Moreover, `oom_score_adj` is also Pod priority agnostic (except that critical pods always get `-998`, regardless their QoS class) which can cause higher priority pods to get evicted before lower priority pods under node memory pressure.
Repository: puppeteer
Issue: Unable to move mouse on elements using Pointer Lock API
Labels: bug,confirmed,P3

<!--
STEP 1: Are you in the right place?

- For general technical questions or "how to" guidance, please search StackOverflow for questions tagged "puppeteer" or create a new post.

https://stackoverflow.com/questions/tagged/puppeteer

- For issues or feature requests related to the DevTools Protocol (https://chromedevtools.github.io/devtools-protocol/), file an issue there:

https://github.com/ChromeDevTools/devtools-protocol/issues/new.

- Problem in Headless Chrome? File an issue against Chromium's issue tracker:

https://bugs.chromium.org/p/chromium/issues/entry?components=Internals%3EHeadless&blocking=705916

For issues, feature requests, or setup troubles with Puppeteer, file an issue right here!
-->

### Steps to reproduce

**Tell us about your environment:**

* Puppeteer version: all versions (tried on 1.12.2 and 1.17.0)
* Platform / OS version: macOS 10.14.4
* URLs (if applicable): https://mdn.github.io/dom-examples/pointer-lock/
* Node.js version: 12.0.0

**What steps will reproduce the problem?**

_Please include code that reproduces the issue._

```javascript
const browser = await puppeteer.launch();

const page = await browser.newPage();
await page.goto('https://mdn.github.io/dom-examples/pointer-lock/');

const el = await page.$('canvas');
const bbox = await el.boundingBox();
const x = bbox.x + bbox.width / 2;
const y = bbox.y + bbox.height / 2;

console.log(x, y);

await page.waitFor(100);
await page.mouse.move(x, y);
await page.waitFor(100);
await page.mouse.down();
await page.waitFor(100);
await page.mouse.move(x + 100, y + 100);
await page.waitFor(100);
await page.mouse.up();
await page.waitFor(100);

await page.screenshot({path: 'screenshot.png'});

await browser.close();
```

**What is the expected result?**
Element should receive mouse events.

**What happens instead?**
Nothing happens, seems like Puppeteer actions are ignored.
Repository: TypeScript
Issue: Allow extending types referenced through interfaces
Labels: Suggestion,In Discussion,Has Repro

## Suggestion

Allow things like the following:

```ts
interface I extends HTMLElementTagNameMap['abbr'] {}
```

Currently, the following error message is given: "An interface can only extend an identifier/qualified-name with optional type arguments." Which I don't even understand.

I believe it requires no further clarification or justification, but please let me know if that is the case...
Repository: flutter
Issue: [google_maps] CameraUpdate.newCameraPosition bearing, tilt & zoom always 0 if empty values
Labels: p: maps,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

## Use case

 Currently if you call animateCamera method and give no values to bearing, tilt or zoom they will always default to 0.
Now when it does this, the map will move (bearing, tilt & zoom) even when it's not wanted.

```
      await controller.animateCamera(
        CameraUpdate.newCameraPosition(
          CameraPosition(
            target: latLng,
            zoom: 17.0,
          ),
        ),
      );
```

## Proposal


- Add possibility to get current tilt, bearing & zoom via controller.
- Modify current animateCamera implementation so it will accept empty values and use current map values instead.

## Additional info
It seems that you can store current camera information via onCameraMove callback on GoogleMap widget.
Repository: go
Issue: x/build/cmd/gopherbot: should not consider backport requests inside backport issues
Labels: help wanted,Builders,NeedsFix

A backport issue should never itself be backported, so gopherbot should reject requests to backport inside such issues.

See https://github.com/golang/go/issues/32261#issuecomment-496157952 where it happened by accident and caused confusing backport-backport issues to be created.

Also happened in https://github.com/golang/go/issues/34881#issuecomment-541459267.