RedApparat / Fotoapparat

Making Camera for Android more friendly. 📸
Apache License 2.0
3.82k stars 407 forks source link

Missing return Statement #324

Closed Eldhopj closed 5 years ago

Eldhopj commented 5 years ago

Showing missing return statement in the function of obtaining bitmap image from photoResult

  public void captureBitmap(){
        fotoapparat.start();
        PhotoResult photoResult = fotoapparat.takePicture();

// obtain Bitmap
        photoResult
                .toBitmap()
                .whenAvailable(new Function1<BitmapPhoto, Unit>() {
                    @Override
                    public Unit invoke(BitmapPhoto bitmapPhoto) {
                        Bitmap bitmap = bitmapPhoto.bitmap;

                    //Missing return stmt}
                }); 
    }

what should i return in here ? i looked the sample code in the repo i didnt see any return stmt there

dmitry-zaitsev commented 5 years ago

You can return Unit.INSTANCE.